]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/customize-preview.js
WordPress 4.4
[autoinstalls/wordpress.git] / wp-includes / js / customize-preview.js
index e58c8d6d44da62e39665ecd578087760d3be5f20..cfda0edf98de971712ff7dd67e5443fbd59ed58f 100644 (file)
@@ -1,3 +1,6 @@
+/*
+ * Script run inside a Customizer preview frame.
+ */
 (function( exports, $ ){
        var api = wp.customize,
                debounce;
@@ -30,8 +33,7 @@
         */
        api.Preview = api.Messenger.extend({
                /**
-                * Requires params:
-                *  - url    - the URL of preview frame
+                * @param {string} url The URL of preview frame
                 */
                initialize: function( params, options ) {
                        var self = this;
                        api.preview.send( 'documentTitle', document.title );
                });
 
+               /*
+                * Send a message to the parent customize frame with a list of which
+                * containers and controls are active.
+                */
                api.preview.send( 'ready', {
                        activePanels: api.settings.activePanels,
                        activeSections: api.settings.activeSections,
                // Display a loading indicator when preview is reloading, and remove on failure.
                api.preview.bind( 'loading-initiated', function () {
                        $( 'body' ).addClass( 'wp-customizer-unloading' );
-                       $( 'html' ).prop( 'title', api.settings.l10n.loading );
                });
                api.preview.bind( 'loading-failed', function () {
                        $( 'body' ).removeClass( 'wp-customizer-unloading' );
-                       $( 'html' ).prop( 'title', '' );
                });
 
                /* Custom Backgrounds */