diff -r 490d5cc509ed -r cf61fcea0001 wp/wp-includes/js/customize-loader.js --- a/wp/wp-includes/js/customize-loader.js Tue Jun 09 11:14:17 2015 +0000 +++ b/wp/wp-includes/js/customize-loader.js Mon Oct 14 17:39:30 2019 +0200 @@ -1,4 +1,10 @@ -/* global _wpCustomizeLoaderSettings, confirm */ +/* global _wpCustomizeLoaderSettings */ +/** + * Expose a public API that allows the customizer to be + * loaded on any page. + * + * @namespace wp + */ window.wp = window.wp || {}; (function( exports, $ ){ @@ -18,9 +24,12 @@ * * e.g. Open Customizer * + * @memberOf wp.customize + * + * @class * @augments wp.customize.Events */ - Loader = $.extend( {}, api.Events, { + Loader = $.extend( {}, api.Events,/** @lends wp.customize.Loader.prototype */{ /** * Setup the Loader; triggered on document#ready. */ @@ -111,7 +120,11 @@ this.active = true; this.body.addClass('customize-loading'); - // Dirty state of Customizer in iframe + /* + * Track the dirtiness state (whether the drafted changes have been published) + * of the Customizer in the iframe. This is used to decide whether to display + * an AYS alert if the user tries to close the window before saving changes. + */ this.saved = new api.Value( true ); this.iframe = $( '