Opened 12 years ago
Closed 11 years ago
#10515 closed feature (wontfix)
Meta: Investigate viability of insertAdjacentHTML use
Reported by: | Rick Waldron | Owned by: | Rick Waldron |
---|---|---|---|
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.
Change History (11)
comment:1 Changed 12 years ago by
Component: | unfiled → manipulation |
---|---|
Milestone: | None → 1.8 |
Owner: | set to Rick Waldron |
Priority: | undecided → low |
Status: | new → assigned |
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
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 12 years ago by
If it removes the need for clean, it would be worth the extra codepath.
comment:6 Changed 12 years ago by
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:7 Changed 11 years ago by
Blocking: | 10903 removed |
---|
comment:8 Changed 11 years ago by
Milestone: | 1.8 → 1.next |
---|
comment:9 Changed 11 years ago by
Type: | enhancement → feature |
---|
Bulk change from enhancement to feature.
comment:10 Changed 11 years ago by
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 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Thoroughly investigated by @orkel in https://github.com/jquery/jquery/pull/1200 and we came to the conclusion that there is no significant benefit.
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/