-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In IE10, readyState is sometimes incorrect and inert tries to observe a document.body which is null #131
Comments
Hey @ryanthemanuel can you tell me how you're loading the polyfill? Is it in the |
@robdodson It's in the head and in a webpack bundle due to the legacy nature of some of the code I'm dealing with. |
@robdodson or anyone else, any thoughts on this? |
I'm also seeing this issue. We are seeing it when using |
@robdodson any more traction with this? |
I'll see if @alice and I can chat about it this week. Sorry for the lag. |
Just making sure I understand, the problem is that on line 483: if (document.readyState === 'loading') { ... this check often fails spuriously in IE? Is the |
btw we just landed a PR (#145) which may help with this... could folks give v3.0.2 a shot to see if it resolves the issue? |
Fixes it for me |
@ryanthemanuel can we close this? |
const a=document. createElement ('p'); |
In IE10, readyState is sometimes incorrect and inert tries to observe a document.body which is null. Possibly this is similar to what is being described in #75.
Basically, from what I can tell, https://github.com/WICG/inert/blob/master/src/inert.js#L481 is flagged incorrectly, and as a result, https://github.com/WICG/inert/blob/master/src/inert.js#L589 crashes due to document.body being null. I see in the comment here: https://github.com/WICG/inert/blob/master/src/inert.js#L588 that this is not always needed (and is actually not in my team's particular case). Is there a way we could expose a way to programmatically disable the document.body functionality?
The text was updated successfully, but these errors were encountered: