Accessing the global scope
- 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
Research direction
Start by investigating how QuickJS creates its scope in Godot and how a web build exposes the HTML document's javascript, window, and document globals. Also examine whether imported JavaScript files can expose methods attached to window. Done should be a clearly defined, supported way to access these globals or an explicit documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100