Modify ↓
Ticket #6733 (closed enhancement: fixed)
make html(fn) use innerHTML if possible
| Reported by: | ehynds | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.4.3 |
| Component: | manipulation | Version: | 1.4.2 |
| Keywords: | html, innerhtml | Cc: | |
| Blocking: | Blocked by: |
Description
For function values passed to html(), the result of the function could be passed through innerHTML first instead of immediately calling empty().append(). performance++
proposed commit @ http://github.com/ehynds/jquery/commit/87feec0b43ec37888169c218d6936e99dfb3157e
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

If this was done, it would make more sense to remove the old parameter since the function could see the existing html. See the discussion at the commit linked above.