[wp-trac] [WordPress Trac] #31334: Customizer JS API should handle container removal from document and provide destroy callback (was: Customizer JS API should handle container removal from document)

WordPress Trac noreply at wordpress.org
Tue Nov 21 01:05:56 UTC 2017


#31334: Customizer JS API should handle container removal from document and provide
destroy callback
-------------------------------------+-------------------------------------
 Reporter:  Aniruddh                 |       Owner:  westonruter
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  Future Release
Component:  Customize                |     Version:  4.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |     Focuses:  javascript,
  needs-unit-tests                   |  administration
-------------------------------------+-------------------------------------

Comment (by westonruter):

 Just as there is a `ready` method that controls can define to add custom
 logic to set up a control, so too there needs to be a `destroy` method
 that is called when the control is removed from `wp.customize.control`.
 This is where calls like `ReactDOM.unmountComponentAtNode()` would be
 made.

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


More information about the wp-trac mailing list