Dean Edwards does it again. He’s fixed the window.onload problem for Firefox and IE.
What is the window.onload problem you ask? A fair enough question. window.onload fires after the page is loaded, allowing developers to init their applications. But if you have a big page, or lots of images, or just a slow connection, you have to wait until the thing loads fully. See Deans sample page showcasing the solution. See? A fast call to your application, while the page is still loading. So very nice.
To solve this Dead “discovered” an undocumented Firefox feature called DOMContentLoaded. How he found this, I dunno. But it’s solid, and does what he needs. IE doesn’t do this though. IE has an attribute called defer that Dean relies upon, and now call use these two functions to solve the problem. This should have huge implications on the Web 2.0.
Tagged As Big Ideas, Coding, Javascript, Reference, Tip
Comments are Open (0)
Posted at 08:25 AM