mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-17 08:48:58 +00:00
Alias global as self and window
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
This commit is contained in:
@@ -20,6 +20,10 @@ fn execJS(
|
||||
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);
|
||||
|
||||
// add document object
|
||||
try js_env.addObject(apis, doc, "document");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user