Why are async functions considered invalid/unrecognized by MediaWiki's parser?
var function = async function(){
}
"JavaScript parse error: Parse error: Missing ; before statement in file"
Why are async functions considered invalid/unrecognized by MediaWiki's parser?
var function = async function(){
}
"JavaScript parse error: Parse error: Missing ; before statement in file"
Yeah, it simply throws this error
JavaScript parse error: Parse error: Missing ; before statement in file 'User:FunPL/common.js' on line 37
and it doesn't execute the code.
async function help(){
alert("Works?")
}
help()
Tested this snippet just now and it doesn't work, if I remove 'async' it works
MediaWiki JS pages are still on ES5. They do not officially support syntax that is newer than that.