Skip to content
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

Setting .inert property doesn't work if script is async #29

Open
robdodson opened this issue Oct 3, 2016 · 0 comments
Open

Setting .inert property doesn't work if script is async #29

robdodson opened this issue Oct 3, 2016 · 0 comments

Comments

@robdodson
Copy link
Collaborator

If inert.js is loaded as <script src="inert.js" async> and I select an element and set its .inert=true property before the script has had a chance to load, that inert property will not get picked up by the initial pass in _onDocumentLoaded. I believe you must use the inert attribute, instead of the property, for initial setup, if you're loading the script async.

Would it be possible to inspect to see if an element has set its inert property when we patch the prototype? If not, we may want to indicate in the docs that this is a gotcha.

cc @alice @paullewis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant