Ticket #10515 (closed feature: wontfix)
Meta: Investigate viability of insertAdjacentHTML use
| Reported by: | rwaldron | Owned by: | rwaldron |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | manipulation | Version: | 1.7b2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
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.
Change History
comment:1 Changed 20 months ago by rwaldron
- Owner set to rwaldron
- Priority changed from undecided to low
- Status changed from new to assigned
- Component changed from unfiled to manipulation
- Milestone changed from None to 1.8
comment:2 Changed 20 months ago by aymeric@…
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/
comment:3 Changed 20 months ago by dmethvin
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.
comment:4 Changed 19 months ago by timmywil
If it removes the need for clean, it would be worth the extra codepath.
comment:6 Changed 19 months ago by dmethvin
- Blocking 10903 added
(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.
comment:9 Changed 9 months ago by dmethvin
- Type changed from enhancement to feature
Bulk change from enhancement to feature.
comment:10 Changed 6 months ago by dmethvin
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.
comment:11 Changed 3 months ago by dmethvin
- Status changed from assigned to closed
- Resolution set to wontfix
Thoroughly investigated by @orkel in https://github.com/jquery/jquery/pull/1200 and we came to the conclusion that there is no significant benefit.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
