1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Remove ECMAScript 6 "arrow operator".

We don't need it, it's not well supported by compilers, and it was a
mistake in the first place.
This commit is contained in:
Fabio Alessandrelli
2019-10-24 16:46:31 +02:00
parent 982774e639
commit 9d13a37b81

View File

@@ -837,7 +837,7 @@ void OS_JavaScript::set_clipboard(const String &p_text) {
var text = UTF8ToString($0); var text = UTF8ToString($0);
if (!navigator.clipboard || !navigator.clipboard.writeText) if (!navigator.clipboard || !navigator.clipboard.writeText)
return 1; return 1;
navigator.clipboard.writeText(text).catch(e => { navigator.clipboard.writeText(text).catch(function(e) {
// Setting OS clipboard is only possible from an input callback. // Setting OS clipboard is only possible from an input callback.
console.error("Setting OS clipboard is only possible from an input callback for the HTML5 plafrom. Exception:", e); console.error("Setting OS clipboard is only possible from an input callback for the HTML5 plafrom. Exception:", e);
}); });