godotjs / godotjs/javascript

Accessing the global scope

Open
#68 4 comments 0 reactions 0 assignees View on GitHub
wontfix
Dominant language
C++
Stars
1.1k
Forks
80
PR merge metrics
No merged PRs in 30d

Description

Hello again!
I've been trying to figure out a way around this problem I've run into. QuickJS creates its own scope within Godot, but I need to access the javascript, the window variable, or the document variable included with the HTML document from a web build and I don't think that's possible.

Alternatively I could also import the js file into Godot and run it, but this js file attaches its methods to the window, and since window is not defined, there's no way to access them.

Has anyone else run into this problem?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.