mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
Add a "pre" polyfill
This is always run, but only the full webcomponents polyfill, it's very small and isn't intrusive. This introduces a layer of indirection so that, if the full polyfill is loaded, its monkeypatched constructor will be called
This commit is contained in:
@@ -284,6 +284,9 @@ pub fn pageCreated(bc: anytype, page: *Page) !void {
|
||||
if (bc.isolated_world) |*isolated_world| {
|
||||
// We need to recreate the isolated world context
|
||||
try isolated_world.createContext(page);
|
||||
|
||||
const polyfill = @import("../../browser/polyfill/polyfill.zig");
|
||||
try polyfill.preload(bc.arena, &isolated_world.executor.js_context.?);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user