iframe: move HTMLIFrameElement in its own file

This commit is contained in:
Pierre Tachoire
2025-08-07 10:35:04 +02:00
parent 28397bf9d0
commit b199925f91
2 changed files with 31 additions and 7 deletions

View File

@@ -61,7 +61,6 @@ pub const Interfaces = .{
HTMLHeadElement,
HTMLHeadingElement,
HTMLHtmlElement,
HTMLIFrameElement,
HTMLImageElement,
HTMLImageElement.Factory,
HTMLInputElement,
@@ -102,6 +101,7 @@ pub const Interfaces = .{
HTMLVideoElement,
@import("form.zig").HTMLFormElement,
@import("iframe.zig").HTMLIFrameElement,
@import("select.zig").Interfaces,
};
@@ -584,12 +584,6 @@ pub const HTMLHtmlElement = struct {
pub const subtype = .node;
};
pub const HTMLIFrameElement = struct {
pub const Self = parser.IFrame;
pub const prototype = *HTMLElement;
pub const subtype = .node;
};
pub const HTMLImageElement = struct {
pub const Self = parser.Image;
pub const prototype = *HTMLElement;

View File

@@ -0,0 +1,30 @@
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
//
// Francis Bouvier <francis@lightpanda.io>
// Pierre Tachoire <pierre@lightpanda.io>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
const std = @import("std");
const Allocator = std.mem.Allocator;
const parser = @import("../netsurf.zig");
const Page = @import("../page.zig").Page;
const HTMLElement = @import("elements.zig").HTMLElement;
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#htmliframeelement
pub const HTMLIFrameElement = struct {
pub const Self = parser.IFrame;
pub const prototype = *HTMLElement;
pub const subtype = .node;
};