We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.4.stable
Windows10
Hi,
when doing
JavaScript.get_interface("document").addEventListener("visibilitychange", callback)
with
var callback = JavaScript.create_callback(self, "_on_focus_in")
The callback is never called.
Create a new project with a simple Node, an attached script with:
extends Node var callback = JavaScript.create_callback(self, "_on_focus_in") func _on_focus_in(): print("FOCUSSSSSS IN") func _ready(): if OS.get_name() == "HTML5": JavaScript.get_interface("document").addEventListener("visibilitychange", callback)
Execute in HTML5 target. Open a browser and run the code: The callback is never executed, the message "FOCUSSSS IN" is never printed.
No response
The text was updated successfully, but these errors were encountered:
For the record, this question was cross-posted on the Godot forums.
Sorry, something went wrong.
You need to accept the event parameter in your callback function.
Thanks @nisovin !! 💯
No branches or pull requests
Godot version
3.4.stable
System information
Windows10
Issue description
Hi,
when doing
JavaScript.get_interface("document").addEventListener("visibilitychange", callback)
with
var callback = JavaScript.create_callback(self, "_on_focus_in")
The callback is never called.
Steps to reproduce
Create a new project with a simple Node, an attached script with:
Execute in HTML5 target. Open a browser and run the code: The callback is never executed, the message "FOCUSSSS IN" is never printed.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: