Opened 12 years ago

Closed 11 years ago

#10081 closed defect (duplicate)

Fix DOMContentLoaded logic in hostenv_browser to be more robust to weird IE states

Reported by: James Burke Owned by: James Burke
Priority: high Milestone: 2.0
Component: Core Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:


There have been occasional reports of our addOnLoad calls being fired prematurely in IE, before the page is ready. These are usually fairly involved pages with lots going on, so it has been hard to get a test case.

However, with the removal of FF2 support, the DOMContentLoaded stuff can be reworked, and hopefully remove the script defer tag for IE that I suspect is causing most of the problems. It will also remove some complaints from people who use HTTPWatch, where it logs the : call that defer script does.

Change History (7)

comment:1 Changed 12 years ago by James Burke

Resolution: fixed
Status: newclosed

(In [20523]) Fixes #10081, make the DOMContentLoaded simpler and do not rely on a script defer in IE.

comment:2 Changed 12 years ago by remi

I thought the dropped FF2 support was only valid for Dijits (see also, section Dijit -> Browser support). Or is this valid for the whole Toolkit?

comment:3 Changed 12 years ago by James Burke

remi: I updated the release notes to put the browser support section at the top. It does apply to the whole toolkit. If a browser is not supported, it still may work, but no effort is taken to test unsupported browsers and any specific fix for an unsupported browser is likely not to be done.

Specifically, in core, there was a case where if the syn XHR loader was loading modules and the page also was loading lots of image data, the browser might hang. It was an edge condition, but prevented us from using DOMCOntentLoaded across the board for that browser. Pages that use Dojo in FF 2 mostly likely will be fine.

comment:4 Changed 12 years ago by James Burke

(In [20531]) Refs #10081, put back in the script defer for IE. David Mark pointed out that document.readyState changes at window.onload time, so it basically means previous change only fired addOnLoad callbacks in IE on window onload. While the edge case breakage with the script defer is unfortunate, losing DOMContentLoaded for the majority case in IE is more unfortunate. So putting it back. But removed the interval timer since it was basically useless.

comment:5 Changed 12 years ago by James Burke

Milestone: 1.42.0
Resolution: fixed
Status: closedreopened

Still using the script defer for now. Reconsider for a Dojo 2.0.

comment:6 Changed 11 years ago by Yousuf Haider

I've just filed a bug here :

That contains a reproducible case of the script defer mechanism breaking in IE.

comment:7 Changed 11 years ago by James Burke

Resolution: duplicate
Status: reopenedclosed

Closing this bug in favor of #10918 even though this bug came first. The changes to the DOMContentLoaded happened in #10918.

Note: See TracTickets for help on using tickets.