Posts

Showing posts with the label IE8

...btw, getters & setters for IE 6, 7, and 8 (almost!) : Object.createStatic

Image
Update Yes, I did it: getters and setters for IE < 9 and other browsers Update apparently Dojo framework explored this stuff before me Re-Update: More limitations!!! Apparently I have said "Hooray!" too early, @_bga told me that this way is compatible with primitives only since the moment we have a property with an object or a function, this will converted into string. So: don't return objects or functions since these will not work as expected! Well, still something tho ... I should probably change the title with a big "almost" ... ... pretty much, the " dream comes true " features that could open hundreds of doors for current Web development status is here, but before we can understand properly the example page , we surely need a bit of introduction about the topic ... Getters/Setters For Everybody! Getters and Setters are beautiful, powerful, and the ideal scenario for whatever developer behind any sort of API. Getters and Setters work perfect...

IE8 Beta 2 - inline images, and anything else

With IE8, we finally can "play" with inline images, specially for CSS or other little decorations. The main limitation is that the length of the data protocol has a maximum fixed length, but even worst is that IE8 apparently introduced the data protocol only for images. In another scenario,where we would like to use the same technique for other purposes, IE is still the only browser that does not respect standards. This is an example: function evalazy(src, callback){ var script = document.createElement("script"), body = document.documentElement; if(callback) script.onload = callback; script.type = "application/javascript"; script.src = "data:" + script.type + "," + encodeURIComponent(src); body.removeChild(body.appendChild(script)); }; Above function is able to evaluate valid JavaScript code in an asynchronous way, calling a callback, if any, when evaluation has been completed ( kinda load runt...