Re: [xwiki-devs] [xwiki-notifications] r14355 - sandbox/xwiki-application-ratings/src/main/resources/XWiki
jvelociter (SVN) wrote:
+Event.observe(window, 'load', function()
I learned that the version of prototype we are using allows us to use: document.observe("dom:loaded", function(){...}); This is better, since onload is triggered once all the components of the page are loaded (including images), while dom:loaded is triggered as soon as all the HTML was received, without waiting for other resources to load. More info on http://www.prototypejs.org/api/document/observe -- Sergiu Dumitriu http://purl.org/net/sergiu/
Thanks a lot for the hint! I tested, the difference is visible Jerome Sergiu Dumitriu wrote:
jvelociter (SVN) wrote:
+Event.observe(window, 'load', function()
I learned that the version of prototype we are using allows us to use:
document.observe("dom:loaded", function(){...});
This is better, since onload is triggered once all the components of the page are loaded (including images), while dom:loaded is triggered as soon as all the HTML was received, without waiting for other resources to load. More info on http://www.prototypejs.org/api/document/observe
Jerome Velociter wrote:
Thanks a lot for the hint! I tested, the difference is visible
We should update all the onload listeners then.
Sergiu Dumitriu wrote:
jvelociter (SVN) wrote:
+Event.observe(window, 'load', function() I learned that the version of prototype we are using allows us to use:
document.observe("dom:loaded", function(){...});
This is better, since onload is triggered once all the components of the page are loaded (including images), while dom:loaded is triggered as soon as all the HTML was received, without waiting for other resources to load. More info on http://www.prototypejs.org/api/document/observe
-- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (2)
-
Jerome Velociter -
Sergiu Dumitriu