Skip to content

Conversation

@timmywil
Copy link
Member

From my preliminary tests, the DOMNodeInserted event is still supported in our supported browsers.

Fixes gh-2055

@dmethvin
Copy link
Member

This was fixed in Sizzle, right?

Seems like the test is going to be brittle since these events are deprecated and will be removed eventually. If this is the only text-node event we need to guard against, how about if you add a check for DOMNodeInserted in this unit test before doing the actual test? That way we could do something like assert.ok( true, "DOM Mutation events not supported").

@gibson042
Copy link
Member

Sizzle still throws on text node input, but 9d820fb in jQuery protects it from seeing them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deprecation of DOMNodeInserted event could be addressed by a plan B that uses fireNative to synthesize an event on a comment node.

@timmywil timmywil force-pushed the gh-2055 branch 2 times, most recently from 2e4f9fe to cb273e5 Compare November 4, 2015 15:03
@timmywil
Copy link
Member Author

timmywil commented Nov 4, 2015

Added fallback for when DOMNodeInserted is no longer supported.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be document.createComment, since we don't assert that jQuery.parseHTML handles comments (and in fact explicitly avoid doing so).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I wouldn't call that explicitly avoiding it, just explicitly accounting for their possible absence, but I forgot that some browsers remove them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, we mean the same thing, I think.

@timmywil timmywil merged commit 493b0fd into jquery:master Nov 4, 2015
@timmywil timmywil deleted the gh-2055 branch November 4, 2015 23:12
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants