[FIX] #39 - events on top level #49

Merged
darylteo merged 2 commits from patch-39 into master 2016-01-05 01:14:17 -05:00
darylteo commented 2016-01-04 06:34:23 -05:00 (Migrated from github.com)

Events triggered on top level elements (such as window or document)
lead to a HierarchyRequestError due to a fix in IE browsers
where dispatchEvent does not fire if an element is not in the DOM.

The current test is simply to check for the existence of parentNode
However, this means top level elements get added to itself, causing
the error.

The proposed fix simply tests for top level elements in the test.

Events triggered on top level elements (such as window or document) lead to a HierarchyRequestError due to a fix in IE browsers where dispatchEvent does not fire if an element is not in the DOM. The current test is simply to check for the existence of parentNode However, this means top level elements get added to itself, causing the error. The proposed fix simply tests for top level elements in the test.
darylteo commented 2016-01-04 06:35:00 -05:00 (Migrated from github.com)

Unfortunately testling doesn't seem supported on OS X. I will try to figure it out at some stage, but if not then I won't be able to run tests.

Unfortunately testling doesn't seem supported on OS X. I will try to figure it out at some stage, but if not then I won't be able to run tests.
darylteo commented 2016-01-04 06:56:41 -05:00 (Migrated from github.com)

Will note that some other test is failing, not my changes.

Will note that some other test is failing, not my changes.
MoOx commented 2016-01-05 01:14:14 -05:00 (Migrated from github.com)

Looks good !

Looks good !
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#49