mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-25 10:40:25 +01:00
Change exit action for HTML5
Previously HTML5 exports would reload the page on exit. This commit changes the behaviour to go back to the previous page (if any) or close the tab and/or window if there is no previous page.
This commit is contained in:
parent
77a3b1a385
commit
b97c7116a7
1 changed files with 1 additions and 1 deletions
|
@ -161,7 +161,7 @@ func _on_Terminal_key_pressed(data: String, event: InputEventKey) -> void:
|
||||||
scene.queue_free()
|
scene.queue_free()
|
||||||
"Exit":
|
"Exit":
|
||||||
if OS.has_feature("JavaScript"):
|
if OS.has_feature("JavaScript"):
|
||||||
JavaScript.eval("window.location.reload()")
|
JavaScript.eval("window.history.back() || window.close()")
|
||||||
get_tree().quit()
|
get_tree().quit()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue