I tried this on my machine and it seems like I found a problem. QML gives me a parsing error. Indeed, in the fragment
(function () {
extend(null, {
gett : function (units) {
return null;
},
as : function (units) {
}
});
})();
It cannot parse the code around asbecause it asis a keyword in QML and is not in javascript. Thus, it seems that sometimes you cannot use javascript libraries "as is".
To fix the problem, we can add quotes around as: "as".
source
share