Merge pull request #33036 from Faless/js/no_ecma6

Remove ECMAScript 6 "arrow operator".
This commit is contained in:
Rémi Verschelde 2019-10-24 20:48:50 +02:00 committed by GitHub
commit ea901b263c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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