Use window.addEventListener/window.attachEvent to register window callbacks. This is to avoid having the callback overwritten when window.on* properties are updated.
It should be noted in the Wiki documentation that if you want to add any of your own scripts to window.onload, onunload, onbeforeunload, etc. you should use the window.addEventListener or window.attachEvent (IE before version 9).
Mircea Toma
added a comment - It should be noted in the Wiki documentation that if you want to add any of your own scripts to window.onload, onunload, onbeforeunload, etc. you should use the window.addEventListener or window.attachEvent (IE before version 9).
Modified window or document event listener registration functions to use addEventListener/attachEvent methods to avoid the overwriting that can occur when using the window.on**** properties.
Mircea Toma
added a comment - Modified window or document event listener registration functions to use addEventListener/attachEvent methods to avoid the overwriting that can occur when using the window.on**** properties.
Mircea Toma
added a comment - Added warning/usage notes for ice.onLoad and ice.onUnload functions in the Wiki page http://wiki.icesoft.org/display/ICE/JavaScript+Client+API .
It should be noted in the Wiki documentation that if you want to add any of your own scripts to window.onload, onunload, onbeforeunload, etc. you should use the window.addEventListener or window.attachEvent (IE before version 9).