Skip to main content

Bug Tracker

Side navigation

#10515 closed feature (wontfix)

Opened October 17, 2011 11:11PM UTC

Closed March 15, 2013 02:34PM UTC

Meta: Investigate viability of insertAdjacentHTML use

Reported by: rwaldron Owned by: rwaldron
Priority: low Milestone: 1.next
Component: manipulation Version: 1.7b2
Keywords: Cc:
Blocked by: Blocking:
Description

The latest Firefox will have support for this, I'm wondering if support is wide enough now to consider adding it to any of the manipulation logic paths.

Attachments (0)
Change History (11)

Changed October 17, 2011 11:11PM UTC by rwaldron comment:1

component: unfiledmanipulation
milestone: None1.8
owner: → rwaldron
priority: undecidedlow
status: newassigned

Changed November 10, 2011 09:37AM UTC by aymeric@kodono.info comment:2

It's an awesome idea. The Mozilla Team wrote an article about the better performance of this function: http://hacks.mozilla.org/2011/11/insertadjacenthtml-enables-faster-html-snippet-injection/

Changed November 10, 2011 02:06PM UTC by dmethvin comment:3

It would be nice if we could totally replace our fragment cache with insertAdjacentHTML instead. That would mitigate the code bloat and eliminate the pseudo-leak that the frag cache causes. However we'd need to see how iAH handles the cases already in .clean() which are primarily IE 6/7/8 workarounds.

Changed November 16, 2011 03:59PM UTC by timmywil comment:4

If it removes the need for clean, it would be worth the extra codepath.

Changed November 16, 2011 04:00PM UTC by timmywil comment:5

#10804 is a duplicate of this ticket.

Changed November 28, 2011 12:21AM UTC by dmethvin comment:6

blocking: → 10903

(In #10903) None of the HTML processing code in jQuery.clean or jQuery.buildFragment currently attaches content to the document, that's done later when the method-specific callback (e.g., append, prepend, before, after) is called. So this isn't a simple change and a very cornery case.

However, we've been talking about using insertAdjacentHTML in #10515 which might solve this problem so I'll leave it open. If it can't be worked in there I think we will close this wontfix.

Changed June 04, 2012 05:44PM UTC by dmethvin comment:7

blocking: 10903

Changed June 18, 2012 04:28PM UTC by mikesherov comment:8

milestone: 1.81.next

Changed September 09, 2012 01:11AM UTC by dmethvin comment:9

type: enhancementfeature

Bulk change from enhancement to feature.

Changed December 28, 2012 02:07AM UTC by dmethvin comment:10

Pull request at https://github.com/jquery/jquery/pull/1095 for one narrow but common case, $(selector).append(html), but I'd like to see perfs before landing it.

Changed March 15, 2013 02:34PM UTC by dmethvin comment:11

resolution: → wontfix
status: assignedclosed

Thoroughly investigated by @orkel in https://github.com/jquery/jquery/pull/1200 and we came to the conclusion that there is no significant benefit.