Wordpress/tests/qunit/wp-admin/js
Weston Ruter 78b73c8906 Customizer: Defer embedding widget controls to improve DOM performance and initial load time.
The Menu Customizer feature includes a performance technique whereby the controls for nav menu items are only embedded into the DOM once the containing menu section is expanded. This commit implements the same DOM deferral for widgets but goes a step further than just embedding the controls once the widget area's Customizer section is expanded: it also defers the embedding of the widget control's form until the widget is expanded, at which point the `widget-added` event also fires to allow any additional widget initialization to be done. The deferred DOM embedding can speed up initial load time by 10x or more. This DOM deferral also yields a reduction in overall memory usage in the browser process.

Includes changes to `wp_widget_control()` to facilitate separating out the widget form from the surrounding accordion container; also includes unit tests for this previously-untested function. Also included are initial QUnit tests (finally) for widgets in the Customizer.

Fixes #33901.


git-svn-id: https://develop.svn.wordpress.org/trunk@34563 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 21:01:46 +00:00
..
customize-base.js Customizer: Move private helper functions to wp.customize.utils so they can be unit tested. 2014-12-02 22:55:48 +00:00
customize-controls-utils.js Customizer: Move private helper functions to wp.customize.utils so they can be unit tested. 2014-12-02 22:55:48 +00:00
customize-controls.js Customizer: Improve JS templates for Panels and Sections added in [32658]. 2015-06-01 22:46:56 +00:00
customize-header.js Customizer: Allow to skip cropping header images if image width is smaller than or equal to theme width. 2014-04-25 20:24:28 +00:00
customize-nav-menus.js JSHint for [33528]: remove logging 2015-08-03 21:57:04 +00:00
customize-widgets.js Customizer: Defer embedding widget controls to improve DOM performance and initial load time. 2015-09-25 21:01:46 +00:00
password-strength-meter.js Use only one var per scope in our password-strength-meter tests. 2013-11-07 20:40:12 +00:00
word-count.js Editor: word count: better names for types. 2015-07-27 11:18:55 +00:00