by pbakker » Thu Aug 26, 2010 9:46 am
Unfortunately currently not: The warning reporting is based on the JavaScript Strict mode implementation of the JavaScript engine and assigning undeclared variables is not considered wrong (unfortunatly).
The latest version of JavaScript (EcmaScript), version 5 (ES5) has formalized Strict mode and it contains 2 items to this respect:
- When the JavaScript code is running in strict mode, it's not allowed to create variables without using the var keyword
- You can "seal" objects after declaration, which means that trying to set a property that doesn't exist on the object will thrown an error, instead of adding the property.
Now, the question is: when can we have it? Dunno, unfortunately, all makers of JavaScript engines (ie most browser vendors and Mozilla Rhino (which we use)) are still working on implementing all of this. As soon as Rhino has implemented it, we can start considering upgrading the Rhino engine version used in Servoy.
In other words: it'll not happen overnight unfortunalty.
Paul