Posts

Showing posts with the label ES3

Graceful Migration From ES3 to ES5

Just slides I have showed today here @ nokia for a tech talk, hope you'll enjoy them, cheers Update Here you can find the updated version of the Object.forEach proposal: gist 2294934 Main changes are about some inconsistent behavior in Safari, not it should work without problems. Thanks to @medikoo for his hint. ... rock'n'roll ...

ES5 and use strict

Update There was another article about it which has less examples but more complementary points or descriptions. Moreover, that page links to a specific use strict compatibility page , right now green only with Firefox Aurora and Google Chrome Canary . However, another page shows more use strict cases as well and Canary seems to miss one check while Webkit Nightly shows all green YES. Opera Next is not there yet while IE10 surprisingly scores all of them except Function declaration in statements. Well done guys! on page 233 of the ECMAScript 5th Edition we can read details about "use strict" activation and what it means for our code. Somebody believes this ES5 feature can help developers to write less errors ... well, I think not everything is that good as it looks. This post is about all those points with concrete examples. No OctalIntegerLiteral or OctalEscapeSequence Base 8 has not many use cases on daily JS tasks. As example, to obtain the number 8 in base 8 we c...

Object.defineHybridProperty

Update Yes, I did it: getters and setters for IE < 9 and other browsers After my early Hooorrayyyy! about compatible IE , I have been experimenting a bit more on how to solve the JSObject to VBVariant and vice-versa assignment and the result was an horrendous monster loads of potential memory leaks and performances implications for the already slow bounce of browsers such IE8, 7, and 6. Since limitations were also too many, as described in this even earlier attempt from dojo framework , I have realized that VBScript was simply a no-go , or better, probably the wrong answer to the question: how can I have cross-browser getters and setters? The jQuery Hybrid Answer Back in 2009, James Padolsey described the jQuery framework as a sort of getters/setters simulator API, comparing the semantic and beauty of non-standard Spidermonkey __defineGetter__ and __defineSetter__ , against jQuery coding style, where many "methods" could be considered as getters or setters. // get t...