![]() ![]() Transpiling stuff with Babel works great on a lot of features, but things like block scoping and constants would work a lot better if it was supported natively in the engine. I don't know if QML can support ES2015 modules - that might conflict with its use of the import keyword.įolks can try out ES2015 features in-browser here using the Babel transpiler: Also uses a lexical `this` in the body of the function. ![]() "Arrow functions", simple anonymous functions that look like this: `argument => doSomething(argument)`.7 - To enable language features introduced. Note that not all browsers implement them. Template Strings - multiline strings without needing to concat strings, and inlining variables like this: `This is a string with a $ in it!` 6 - To tell JSHint that your code uses ECMAScript 6 specific syntax.Block scoped variables using "let" instead of "var".The latest version of the ECMAScript spec, ECMAScript 2015 (formerly called ECMAScript 6) has been finalized and it would be wonderful to be able to use the features it brings to Javascript in QML, especially:
0 Comments
Leave a Reply. |