Changes between Initial Version and Version 1 of Ticket #10411


Ignore:
Timestamp:
Nov 26, 2009, 11:17:29 AM (11 years ago)
Author:
bill
Comment:

Actually, that code is getting called (even in 1.3).

Probably you are testing with an alert() or something similar, but by the time the code runs, it's too late to display the alert. However, if you add a "debugger;" into that code you can see it running when the page unloads. (Of course, don't forget to press the "start debugging" button in IE8, from the developer's console.)

addOnLoad() is not appropriate because it sometimes gets called even when the page isn't unloading, and (of course) it would be bad to destroy the widgets in that case.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10411

    • Property Status changed from new to closed
    • Property Component changed from General to Dijit
    • Property Resolution changed from to worksforme
  • Ticket #10411 – Description

    initial v1  
    22It turns out that the code below (dijit manager) does nothing:
    33
     4{{{
    45if(dojo.isIE){
    56        // Only run this for IE because we think it's only necessary in that case,
     
    1516        });
    1617}
     18}}}
    1719
    1820If I change "addOnWindowUnload", to "addOnUnload", uninitialize gets called. However, I fear this is too late to clean up the DOM, as it might be screwed up in onUnload already (read something like that somewhere in the Dojo docs). Any ideas?