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

WordPress Trac noreply at wordpress.org
Mon Sep 29 12:02:08 UTC 2014


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

Comment (by OriginalEXE):

 Removing events is only 'dangerous' if removed elements are going to be
 returned to the dom.

 From my inspection, this does not happen anywhere. The only place where
 object is returned (and where events could potentially break) when
 `.html('')` is used is in wp-ajax-response.js, so just to be sure, i used
 `detach()` there instead.

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


More information about the wp-trac mailing list