mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 23:23:28 +00:00
Adds a dummy PerformanceObserver. Only the supportedEntryTypes static attribute is supported, and it currently returns an empty array. This hopefully prevents code from trying to use it. For example, before using it, reddit checks if specific types are supported and, if not, doesn't use it. This introduced complexity in the js runtime. Our current approach to attributes only works with primitive types. Non-primitive types can't be attached to a FunctionTemplate (v8 will crash saying only primitive types can be set). Plus, all non primitive types require a context to create anyways. We now detect "primitive" attributes and "complex" attributes. Primitive attributes are setup as before. Complex attributes are setup per-context, requiring another loop through our types to detect & setup on each context creation.
41 lines
1.5 KiB
Zig
41 lines
1.5 KiB
Zig
// Copyright (C) 2023-2024 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 HTMLDocument = @import("document.zig").HTMLDocument;
|
|
const HTMLElem = @import("elements.zig");
|
|
const SVGElem = @import("svg_elements.zig");
|
|
const Window = @import("window.zig").Window;
|
|
const Navigator = @import("navigator.zig").Navigator;
|
|
const History = @import("history.zig").History;
|
|
const Location = @import("location.zig").Location;
|
|
const MediaQueryList = @import("media_query_list.zig").MediaQueryList;
|
|
|
|
pub const Interfaces = .{
|
|
HTMLDocument,
|
|
HTMLElem.HTMLElement,
|
|
HTMLElem.HTMLMediaElement,
|
|
HTMLElem.Interfaces,
|
|
SVGElem.SVGElement,
|
|
Window,
|
|
Navigator,
|
|
History,
|
|
Location,
|
|
MediaQueryList,
|
|
@import("screen.zig").Interfaces,
|
|
};
|