Test for callback context #435

Merged
merged 1 commit into from Jul 11, 2012

Conversation

Projects
None yet
2 participants
@iangreenleaf
Contributor

iangreenleaf commented Apr 11, 2012

Old-style inline callbacks are executing in the context of the window, rather than of the element that triggered the event. This causes problems when we have a callback like:

onclick="doSomething(this)"

I got as far as writing a failing test, but then I looked at the Contextify stuff and realized I wasn't sure what was going on, so I didn't code up a fix. I hope this is enough to help.

@tmpvar

This comment has been minimized.

Show comment
Hide comment
@tmpvar

tmpvar Apr 12, 2012

Collaborator

yeah, this helps. We'll need to fix before I can land this though

Collaborator

tmpvar commented Apr 12, 2012

yeah, this helps. We'll need to fix before I can land this though

@tmpvar tmpvar merged commit 04f1b2c into jsdom:master Jul 11, 2012

graemeworthy added a commit to graemeworthy/jsdom that referenced this pull request Nov 10, 2016

Check for client.abort function before executing.
line is now identical to the open() method, on #435 in the same file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment