ded / domready

lets you know when the dom is ready
MIT License
874 stars 129 forks source link

Add Guard for invalid readyState in IE9 and IE10 #17

Closed watcherdm closed 11 years ago

watcherdm commented 12 years ago

IE9 and IE10 can get into a state where

document.readyState === "interactive" // => true

even though the document is not yet ready. This happens when a script tag is added dynamically to A dom (can be detached fragment). Looked for tests but only saw the html file. Need to find solid way to repro this case.

theodoreb commented 11 years ago

This caused a bug in Drupal 8 (which is now using domready) when working with an iframe. The pull request fixes the problem, see http://drupal.org/node/2004098 and for reference http://drupal.org/node/1974580.

Any chance to get this in?

ded commented 11 years ago

right on. this looks good to me. the diff is so small i wonder why it's conflicting with master. do you mind sorting out the conflict?

idflood commented 11 years ago

I simply copy pasted the fix from webspinner without changing anything. The only difference is that the minified version is not updated, which I think may be what is causing the conflict with master.

I did this quick manual reroll to help fix the issue in drupal.

ded commented 11 years ago

merged