[wp-trac] [WordPress Trac] #27034: jQuery methods html('') vs empty()

WordPress Trac noreply at wordpress.org
Wed Jan 21 17:22:05 UTC 2015


#27034: jQuery methods html('') vs empty()
----------------------------+--------------------------------------
 Reporter:  madeinua        |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  4.2
Component:  Administration  |     Version:  3.8.1
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  javascript, performance
----------------------------+--------------------------------------

Comment (by adamsilverstein):

 Replying to [comment:8 helen]:
 > We may not be set up to handle this right now, but just a note for
 now/the future that it would be nice if this was testable in some way,
 particularly in terms of performance.

 Here is some jsPerf data comparing speed for empty(), html('') and native
 .innerHTML = ''

 http://jsperf.com/empty-vs-html/2

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27034#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list