Bug Tracker

Opened 10 years ago

Closed 9 years ago

#4887 closed bug (wontfix)

DOMSubtreeModified triggers twice when using jQuery.fn.html()

Reported by: blairmitchelmore Owned by:
Priority: low Milestone:
Component: manipulation Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

Description

This bug is something I noticed today while playing with the DOMSubtreeModified event. When you call this.html() on a DOM node with child elements DOMSubtreeModified triggers twice. I assume this is because this.html() calls this.empty().append(value).

The test code (run in Firefox, Safari, and Chromium) is available at http://test.blairmitchelmore.com/dom/domsubtreemodified.html

This is fairly trivial, and I can't imagine a non-contrived situation but it does differ from the behaviour of calling this.innerHTML slightly enough to be reported. Feel free not to fix this.

Change History (2)

comment:1 Changed 9 years ago by dmethvin

Component: unfiledmanipulation

comment:2 Changed 9 years ago by Rick Waldron

Milestone: 1.4
Priority: triviallow
Resolution: wontfix
Status: newclosed

Mutation Events are not documented as supported by jQuery.

In fact - they are deprecated:

http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-mutationevents

See also:

http://bugs.jquery.com/ticket/5539

Note: See TracTickets for help on using tickets.