mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-17 00:38:59 +00:00
Alias global as self and window
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
This commit is contained in:
@@ -23,6 +23,10 @@ fn testExecFn(
|
||||
js_env.start(apis);
|
||||
defer js_env.stop();
|
||||
|
||||
// alias global as self and window
|
||||
try js_env.attachObject(try js_env.getGlobal(), "self", null);
|
||||
try js_env.attachObject(try js_env.getGlobal(), "window", null);
|
||||
|
||||
// document
|
||||
doc = try parser.documentHTMLParseFromFileAlloc(std.testing.allocator, "test.html");
|
||||
defer parser.documentHTMLClose(doc);
|
||||
|
||||
Reference in New Issue
Block a user