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

Null relatedTarget in HtmlUnit #15

Open
lukepalmer opened this issue Aug 7, 2013 · 0 comments
Open

Null relatedTarget in HtmlUnit #15

lukepalmer opened this issue Aug 7, 2013 · 0 comments

Comments

@lukepalmer
Copy link

Very useful project!

I find that when running tests with jasmine-maven-plugin, specifically when running a headless test (which internally uses HtmlUnit for the "browser") that event.relatedTarget can be null. This throws on line 118 which tries to get event.relatedTarget.ownerDocument. The same thing works fine when testing inside a browser.

My fix is:
eventDoc = event.relatedTarget ? event.relatedTarget.ownerDocument : undefined || document;

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