-
Notifications
You must be signed in to change notification settings - Fork 66
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
fix error with null document.body #29
Comments
I tried applying that fix but it failed the Karma tests. This whole matches functionality is written synchronously around the idea that |
Yes you should either load scripts in the body per web best practices or do the content loaded handler at the root of your app |
@jquense I know about best practices, but they shouldn't then get turned into silent hard dependencies. I already have a |
Yes, there is basically a dependency that scripts not execute before the body because we need an element to do tests against. You don't need to wait for content loaded, moving the script tag to below the body will work as well. I'm happy to take a PR switching all checks to something more lazy and keeps the API the same. It may be easier tho to not load the script in the HEAD |
In some libraries used dom-helpers appear error:
just replace code in dom-helpers/query/matches.js from
to
That fix problems for null document.body
The text was updated successfully, but these errors were encountered: