I used to think that, when you import a JS resource from QML, this JS file can contain only standard JS code. Then I came across 2 exceptions:
- the
.import
statement - the
property
keyword (in JS), which seems to be only used in code-behind files and apparently adds a property to the QML component that imports the JS
What other "extensions" are there in JS when imported from QML, as compared with standard JS?
And I'd like these two, as well as any other extensions to the JS language, described in full. For example, what's the difference between declaring a global JS variable with and without the property
keyword?