Make WordPress Core

Changeset 63457


Ignore:
Timestamp:
09/03/2026 11:50:46 PM (2 months ago)
Author:
westonruter
Message:

Customize: Correct the JSDoc in the preview frame.

Missing tags and descriptions are added, and the types are corrected, whether they named nothing resolvable (Promise for JQuery.Promise<*>), said too little (Array for string[]), or were narrower than what the code passes.

Both classes in selective-refresh.js lent their prototypes to the wrong name: Partial named wp.customize.SelectiveRefresh.Partial, capitalized unlike the namespace it lives in, and Placement named wp.customize.selectiveRefresh itself, so its methods were attached to the module rather than to the class.

Developed as subset of ​https://github.com/WordPress/wordpress-develop/pull/10743.
Follow-up to r48110, r48650, r63454, r63455, r63456.

Props westonruter, afercia, grapplerulrich, mukesh27.
See #39671, #40831, #64662, #66033.

Location:
trunk/src/js/_enqueues/wp/customize
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/customize/preview-nav-menus.js

    r48650 r63457  
    66
    77/** @namespace wp.customize.navMenusPreview */
     8
     9/**
     10 * @param {JQueryStatic}       $   The jQuery object.
     11 * @param {_.UnderscoreStatic} _   The Underscore.js object.
     12 * @param {Object}             wp  The WordPress global object.
     13 * @param {Object}             api The Customizer API.
     14 */
    815wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function( $, _, wp, api ) {
    916        'use strict';
    … …  
    9198                         * Constructor.
    9299                         *
     100                         * The nav menu arguments are normally given as the container context, which is what the
     101                         * partial is constructed with when the document is scanned, and they may also be passed
     102                         * in the params. Either way they have to be present and to carry an args_hmac matching
     103                         * the one named in the ID, since the constructor throws when they do not.
     104                         *
    93105                         * @since 4.5.0
    94                          * @param {string} id - Partial ID.
    95                          * @param {Object} options
    96                          * @param {Object} options.params
    97                          * @param {Object} options.params.navMenuArgs
    98                          * @param {string} options.params.navMenuArgs.args_hmac
    99                          * @param {string} [options.params.navMenuArgs.theme_location]
    100                          * @param {number} [options.params.navMenuArgs.menu]
    101                          * @param {Object} [options.constructingContainerContext]
     106                         *
     107                         * @param {string} id                                          Partial ID.
     108                         * @param {Object} options                                     Options.
     109                         * @param {Object} options.params                              Parameters for the partial.
     110                         * @param {Object} options.params.navMenuArgs                  Arguments the nav menu was rendered with.
     111                         * @param {string} options.params.navMenuArgs.args_hmac        HMAC of those arguments, which has to match the ID.
     112                         * @param {string} [options.params.navMenuArgs.theme_location] Theme location the menu is assigned to.
     113                         * @param {number} [options.params.navMenuArgs.menu]           ID of the menu.
     114                         * @param {Object} [options.constructingContainerContext]      Context of the container element, used as the nav
     115                         *                                                             menu arguments when no params are supplied.
    102116                         */
    103117                        initialize: function( id, options ) {
    … …  
    132146                         *
    133147                         * @since 4.5.0
    134                          * @param {wp.customize.Value|string} setting  - Object or ID.
    135                          * @param {number|Object|false|null}  newValue - New value, or null if the setting was just removed.
    136                          * @param {number|Object|false|null}  oldValue - Old value, or null if the setting was just added.
    137                          * @return {boolean}
     148                         * @param {wp.customize.Value|string} setting  Object or ID.
     149                         * @param {number|Object|false|null}  newValue New value, or null if the setting was just removed.
     150                         * @param {number|Object|false|null}  oldValue Old value, or null if the setting was just added.
     151                         * @return {boolean} True if the setting is related to this partial, false otherwise.
    138152                         */
    139153                        isRelatedSetting: function( setting, newValue, oldValue ) {
    … …  
    211225                         * @since 4.5.0
    212226                         *
    213                          * @return {Promise}
     227                         * @return {JQuery.Promise<*>} Promise that is resolved when the refresh is complete, or rejected if the partial is no longer associated with a menu.
    214228                         */
    215229                        refresh: function() {
    … …  
    235249                         *
    236250                         * @inheritdoc
    237                          * @param {wp.customize.selectiveRefresh.Placement} placement
     251                         * @param {wp.customize.selectiveRefresh.Placement} placement The placement to render into.
    238252                         */
    239253                        renderContent: function( placement ) {
    … …  
    264278                 * Request full refresh if there are nav menu instances that lack partials which also match the supplied args.
    265279                 *
    266                  * @param {Object} navMenuInstanceArgs
     280                 * @since 4.5.0
     281                 *
     282                 * @param {Object} navMenuInstanceArgs Arguments for a nav menu instance, which may include menu and/or theme_location.
     283                 * @return {boolean} Whether a full refresh was requested.
    267284                 */
    268285                self.handleUnplacedNavMenuInstances = function( navMenuInstanceArgs ) {
    … …  
    283300                 * @since 4.5.0
    284301                 *
    285                  * @param {wp.customize.Value} setting
    286                  * @param {Object}             [options]
    287                  * @param {boolean}            options.fire Whether to invoke the callback after binding.
    288                  *                                          This is used when a dynamic setting is added.
     302                 * @param {wp.customize.Value} setting        The setting to listen to.
     303                 * @param {Object}             [options]      Options.
     304                 * @param {boolean}            [options.fire] Whether to invoke the callback after binding.
     305                 *                                            This is used when a dynamic setting is added.
    289306                 * @return {boolean} Whether the setting was bound.
    290307                 */
    … …  
    331348                 * @since 4.5.0
    332349                 *
    333                  * @param {wp.customize.Value} setting
     350                 * @param {wp.customize.Value} setting The setting to stop listening to.
     351                 * @return {void}
    334352                 */
    335353                self.unbindSettingListener = function( setting ) {
    … …  
    345363                 *
    346364                 * @this {wp.customize.Value}
     365                 * @return {void}
    347366                 */
    348367                self.onChangeNavMenuSetting = function() {
    … …  
    374393                 * @param {Object} oldItem Old value for nav_menu_item[] setting.
    375394                 * @this {wp.customize.Value}
     395                 * @return {void}
    376396                 */
    377397                self.onChangeNavMenuItemSetting = function( newItem, oldItem ) {
    … …  
    389409                 *
    390410                 * @this {wp.customize.Value}
     411                 * @return {void}
    391412                 */
    392413                self.onChangeNavMenuLocationsSetting = function() {
    … …  
    413434         *
    414435         * @since 4.5.0
     436         *
     437         * @return {void}
    415438         */
    416439        self.highlightControls = function() {
  • trunk/src/js/_enqueues/wp/customize/preview-widgets.js

    r48110 r63457  
    1212 * @namespace wp.customize.widgetsPreview
    1313 *
    14  * @param {jQuery} $   The jQuery object.
    15  * @param {Object} _   The utilities library.
    16  * @param {Object} wp  Current WordPress environment instance.
    17  * @param {Object} api Information from the API.
     14 * @param {JQueryStatic}      $   The jQuery object.
     15 * @param {_.UnderscoreStatic} _   The Underscore.js object.
     16 * @param {Object}             wp  The WordPress global object.
     17 * @param {Object}             api The Customizer API.
    1818 *
    1919 * @return {Object} Widget-related variables.
    … …  
    9494                 * @memberOf wp.customize.widgetsPreview
    9595                 *
    96                  * @param {string} id             The partial's ID.
    97                  * @param {Object} options        Options used to initialize the partial's
    98                  *                                instance.
    99                  * @param {Object} options.params The options parameters.
     96                 * @param {string} id               The partial's ID.
     97                 * @param {Object} [options]        Options used to initialize the partial's instance.
     98                 * @param {Object} [options.params] The options parameters.
    10099                 */
    101100                initialize: function( id, options ) {
    … …  
    125124                 * @since 4.5.0
    126125                 *
    127                  * @return {Promise|void} Either a promise postponing the refresh, or void.
     126                 * @return {JQuery.Promise<*>} Promise for the request to render the partial.
    128127                 */
    129128                refresh: function() {
    … …  
    144143                 *
    145144                 * @inheritDoc
    146                  * @param {wp.customize.selectiveRefresh.Placement} placement The placement
    147                  *                                                            function.
     145                 * @param {wp.customize.selectiveRefresh.Placement} placement The placement to render into.
    148146                 *
    149147                 * @return {void}
    … …  
    165163                 * @since 4.5.0
    166164                 *
    167                  * @class
     165                 * @constructs
    168166                 * @augments wp.customize.selectiveRefresh.Partial
    169167                 *
    … …  
    171169                 * @alias wp.customize.widgetsPreview.SidebarPartial
    172170                 *
    173                  * @param {string} id             The partial's ID.
    174                  * @param {Object} options        Options used to initialize the partial's instance.
    175                  * @param {Object} options.params The options parameters.
     171                 * @param {string} id               The partial's ID.
     172                 * @param {Object} [options]        Options used to initialize the partial's instance.
     173                 * @param {Object} [options.params] The options parameters.
    176174                 */
    177175                initialize: function( id, options ) {
    … …  
    294292                 * @since 4.5.0
    295293                 *
    296                  * @return {Array} An array containing placement objects for each of the
    297                  *                 dynamic sidebar boundary nodes.
     294                 * @return {wp.customize.selectiveRefresh.Placement[]} A placement for each of the dynamic
     295                 *                                                     sidebar boundary nodes.
    298296                 */
    299297                placements: function() {
    … …  
    321319                 * @throws {Error} If the API doesn't pass an array of widget IDs.
    322320                 *
    323                  * @return {Array} A shallow copy of the array containing widget IDs.
     321                 * @return {string[]} A shallow copy of the array containing widget IDs.
    324322                 */
    325323                getWidgetIds: function() {
    … …  
    345343                 * @since 4.5.0
    346344                 *
    347                  * @return {Array.<wp.customize.selectiveRefresh.Placement>} List of placements
    348                  *                                                           that were reflowed.
     345                 * @return {wp.customize.selectiveRefresh.Placement[]} List of placements that were reflowed.
    349346                 */
    350347                reflowWidgets: function() {
    … …  
    478475                 * @since 4.5.0
    479476                 *
    480                  * @param {Array} newWidgetIds New widget IDs.
    481                  * @param {Array} oldWidgetIds Old widget IDs.
     477                 * @param {string[]} newWidgetIds New widget IDs.
     478                 * @param {string[]} oldWidgetIds Old widget IDs.
    482479                 *
    483480                 * @return {void}
    … …  
    536533                 * @since 4.5.0
    537534                 *
    538                  * @return {Promise} A promise postponing the refresh.
     535                 * @return {JQuery.Promise<*>} Promise resolved once the sidebar's widgets have been reflowed, or rejected when the sidebar has no placements.
    539536                 */
    540537                refresh: function() {
  • trunk/src/js/_enqueues/wp/customize/preview.js

    r60522 r63457  
    1 /*
     1/**
     2 * @output wp-includes/js/customize-preview.js
     3 */
     4
     5/**
    26 * Script run inside a Customizer preview frame.
    37 *
    4  * @output wp-includes/js/customize-preview.js
     8 * @param {Object}       wp The WordPress global object.
     9 * @param {JQueryStatic} $  The jQuery object.
    510 */
    6 (function( exports, $ ){
     11(function( wp, $ ){
    712        var api = wp.customize,
    813                debounce,
    … …  
    7580         * Returns a debounced version of the function.
    7681         *
     82         * @param {Function} fn        Function to debounce.
     83         * @param {number}   delay     Delay in milliseconds.
     84         * @param {Object}   [context] Context to invoke the function in. Defaults to the calling context.
    7785         * @todo Require Underscore.js for this file and retire this.
     86         *
     87         * @return {Function} Debounced function.
    7888         */
    7989        debounce = function( fn, delay, context ) {
    8090                var timeout;
    81                 return function() {
    82                         var args = arguments;
    83 
     91                return function( ...args ) {
    8492                        context = context || this;
    8593
    … …  
    96104         * @alias wp.customize.Preview
    97105         *
    98          * @constructor
     106         * @class
    99107         * @augments wp.customize.Messenger
    100108         * @augments wp.customize.Class
    … …  
    103111        api.Preview = api.Messenger.extend(/** @lends wp.customize.Preview.prototype */{
    104112                /**
    105                  * @param {Object} params  - Parameters to configure the messenger.
    106                  * @param {Object} options - Extend any instance parameter or method with this object.
     113                 * @param {Object} params  Parameters to configure the messenger.
     114                 * @param {Object} options Extend any instance parameter or method with this object.
    107115                 */
    108116                initialize: function( params, options ) {
    … …  
    143151                 * @access public
    144152                 *
    145                  * @param {jQuery.Event} event Event.
     153                 * @param {JQuery.Event} event Event.
     154                 * @return {void}
    146155                 */
    147156                handleLinkClick: function( event ) {
    … …  
    189198                 * @access public
    190199                 *
    191                  * @param {jQuery.Event} event Event.
     200                 * @param {JQuery.Event} event Event.
     201                 * @return {void}
    192202                 */
    193203                handleFormSubmit: function( event ) {
    … …  
    233243         * @since 4.7.0
    234244         * @access protected
    235          * @access private
    236245         *
    237246         * @return {void}
    … …  
    273282         * @access public
    274283         *
    275          * @param {HTMLAnchorElement|HTMLAreaElement} element Link element.
    276          * @param {string} element.search Query string.
    277          * @param {string} element.pathname Path.
    278          * @param {string} element.host Host.
    279          * @param {Object} [options]
    280          * @param {Object} [options.allowAdminAjax=false] Allow admin-ajax.php requests.
     284         * @param {HTMLAnchorElement|HTMLAreaElement} element                        Link element.
     285         * @param {string}                            element.search                Query string.
     286         * @param {string}                            element.pathname              Path.
     287         * @param {string}                            element.host                  Host.
     288         * @param {Object}                            [options]                      Options.
     289         * @param {Object}                            [options.allowAdminAjax=false] Allow admin-ajax.php requests.
    281290         * @return {boolean} Is appropriate for changeset link.
    282291         */
    … …  
    329338         * @access protected
    330339         *
    331          * @param {HTMLAnchorElement|HTMLAreaElement} element Link element.
    332          * @param {string} element.search Query string.
    333          * @param {string} element.host Host.
    334          * @param {string} element.protocol Protocol.
     340         * @param {HTMLAnchorElement|HTMLAreaElement} element          Link element.
     341         * @param {string}                            element.search  Query string.
     342         * @param {string}                            element.host    Host.
     343         * @param {string}                            element.protocol Protocol.
    335344         * @return {void}
    336345         */
    … …  
    400409                 * Rewrite Ajax requests to inject customizer state.
    401410                 *
    402                  * @param {Object} options Options.
    403                  * @param {string} options.type Type.
    404                  * @param {string} options.url URL.
    405                  * @param {Object} originalOptions Original options.
    406                  * @param {XMLHttpRequest} xhr XHR.
     411                 * @param {Object}         options        Options.
     412                 * @param {string}         options.type    Type.
     413                 * @param {string}         options.url    URL.
     414                 * @param {Object}         originalOptions Original options.
     415                 * @param {XMLHttpRequest} xhr             XHR.
    407416                 * @return {void}
    408417                 */
    … …  
    715724                 * Create/update a setting value.
    716725                 *
    717                  * @param {string}  id            - Setting ID.
    718                  * @param {*}       value         - Setting value.
    719                  * @param {boolean} [createDirty] - Whether to create a setting as dirty. Defaults to false.
     726                 * @param {string}  id            Setting ID.
     727                 * @param {*}       value         Setting value.
     728                 * @param {boolean} [createDirty] Whether to create a setting as dirty. Defaults to false.
    720729                 */
    721730                setValue = function( id, value, createDirty ) {
    … …  
    792801                 * Handle update to changeset UUID.
    793802                 *
    794                  * @param {string} uuid - UUID.
     803                 * @param {string} uuid UUID.
    795804                 * @return {void}
    796805                 */
    … …  
    889898                } );
    890899
    891                 api.when.apply( api, bg ).done( function() {
    892                         $.each( arguments, function() {
     900                api.when.apply( api, bg ).done( function( ...settings ) {
     901                        $.each( settings, function() {
    893902                                this.bind( api.settingPreviewHandlers.background );
    894903                        });
  • trunk/src/js/_enqueues/wp/customize/selective-refresh.js

    r57987 r63457  
    66
    77/** @namespace wp.customize.selectiveRefresh */
     8
     9/**
     10 * @param {JQueryStatic} $   The jQuery object.
     11 * @param {Object}       api The Customizer API.
     12 */
    813wp.customize.selectiveRefresh = ( function( $, api ) {
    914        'use strict';
    … …  
    3136         *
    3237         * @memberOf wp.customize.selectiveRefresh
     38         * @alias wp.customize.selectiveRefresh.Partial
    3339         *
    3440         * @see PHP class WP_Customize_Partial.
    … …  
    3844         * @since 4.5.0
    3945         */
    40         Partial = self.Partial = api.Class.extend(/** @lends wp.customize.SelectiveRefresh.Partial.prototype */{
     46        Partial = self.Partial = api.Class.extend(/** @lends wp.customize.selectiveRefresh.Partial.prototype */{
    4147
    4248                id: null,
    … …  
    4652                 *
    4753                 * @since 4.9.0
    48                  * @var {object}
     54                 * @member {Object}
    4955                 */
    5056                defaults: {
    … …  
    6066                 * @since 4.5.0
    6167                 *
    62                  * @param {string}  id                      - Unique identifier for the partial instance.
    63                  * @param {Object}  options                 - Options hash for the partial instance.
    64                  * @param {string}  options.type            - Type of partial (e.g. nav_menu, widget, etc)
    65                  * @param {string}  options.selector        - jQuery selector to find the container element in the page.
    66                  * @param {Array}   options.settings        - The IDs for the settings the partial relates to.
    67                  * @param {string}  options.primarySetting  - The ID for the primary setting the partial renders.
    68                  * @param {boolean} options.fallbackRefresh - Whether to refresh the entire preview in case of a partial refresh failure.
    69                  * @param {Object}  [options.params]        - Deprecated wrapper for the above properties.
     68                 * @param {string}   id                        Unique identifier for the partial instance.
     69                 * @param {Object}   [options]                Options hash for the partial instance.
     70                 * @param {string}   [options.type]            Type of partial (e.g. nav_menu, widget, etc.).
     71                 * @param {string}   [options.selector]        jQuery selector to find the container element in the page.
     72                 * @param {string[]} [options.settings]        The IDs for the settings the partial relates to.
     73                 * @param {string}   [options.primarySetting] The ID for the primary setting the partial renders.
     74                 * @param {boolean}  [options.fallbackRefresh] Whether to refresh the entire preview in case of a partial refresh failure.
     75                 * @param {Object}   [options.params]          Deprecated wrapper for the above properties.
    7076                 */
    7177                initialize: function( id, options ) {
    … …  
    120126                 * @access public
    121127                 *
    122                  * @param {Placement} placement The placement container element.
     128                 * @param {wp.customize.selectiveRefresh.Placement} placement The placement container element.
    123129                 * @return {void}
    124130                 */
    … …  
    149155                 * @access public
    150156                 *
    151                  * @param {Placement} placement The placement for the partial.
    152                  * @param {jQuery} $editShortcut The shortcut element as a jQuery object.
     157                 * @param {wp.customize.selectiveRefresh.Placement} placement    The placement for the partial.
     158                 * @param {JQuery}                                  $editShortcut The shortcut element as a jQuery object.
    153159                 * @return {void}
    154160                 */
    … …  
    230236                 * @access public
    231237                 *
    232                  * @return {jQuery} The edit shortcut button element.
     238                 * @return {JQuery} The edit shortcut button element.
    233239                 */
    234240                createEditShortcut: function() {
    … …  
    254260                 * @since 4.5.0
    255261                 *
    256                  * @return {Array.<Placement>}
     262                 * @return {wp.customize.selectiveRefresh.Placement[]} The placements for this partial in the document.
    257263                 */
    258264                placements: function() {
    … …  
    286292                 * @since 4.5.0
    287293                 *
    288                  * @return {string[]}
     294                 * @return {string[]} The setting IDs related to this partial.
    289295                 */
    290296                settings: function() {
    … …  
    304310                 * @since 4.5.0
    305311                 *
    306                  * @param {wp.customize.Value|string} setting  ID or object for setting.
     312                 * @param {wp.customize.Value|string} setting ID or object for setting.
    307313                 * @return {boolean} Whether the setting is related to the partial.
    308314                 */
    … …  
    345351                 * @since 4.5.0
    346352                 *
    347                  * @param {Placement} placement
     353                 * @param {wp.customize.selectiveRefresh.Placement} placement The placement to prepare.
    348354                 */
    349355                preparePlacement: function( placement ) {
    … …  
    365371                 *
    366372                 * @this {wp.customize.selectiveRefresh.Partial}
    367                  * @return {jQuery.Promise}
     373                 * @return {JQuery.Promise<*>} Promise for the request to render the partial.
    368374                 */
    369375                refresh: function() {
    … …  
    405411                 * @since 4.5.0
    406412                 *
    407                  * @param {Placement}             placement
    408                  * @param {Element|jQuery}        [placement.container]  - This param will be empty if there was no element matching the selector.
    409                  * @param {string|Object|boolean} placement.addedContent - Rendered HTML content, a data object for JS templates to render, or false if no render.
    410                  * @param {Object}                [placement.context]    - Optional context information about the container.
     413                 * @param {wp.customize.selectiveRefresh.Placement} placement              The placement to render into.
     414                 * @param {Element|JQuery}                          [placement.container] This param will be empty if there was no element matching the selector.
     415                 * @param {string|Object|boolean}                   placement.addedContent Rendered HTML content, a data object for JS templates to render, or false if no render.
     416                 * @param {Object}                                  [placement.context]    Optional context information about the container.
    411417                 * @return {boolean} Whether the rendering was successful and the fallback was not invoked.
    412418                 */
    … …  
    527533         *
    528534         * @memberOf wp.customize.selectiveRefresh
    529          *
    530          * @class Placement
     535         * @alias wp.customize.selectiveRefresh.Placement
     536         *
     537         * @class
    531538         * @augments wp.customize.Class
    532539         * @since 4.5.0
    533540         */
    534         self.Placement = Placement = api.Class.extend(/** @lends wp.customize.selectiveRefresh.prototype */{
     541        self.Placement = Placement = api.Class.extend(/** @lends wp.customize.selectiveRefresh.Placement.prototype */{
    535542
    536543                /**
    537544                 * The partial with which the container is associated.
    538545                 *
    539                  * @param {wp.customize.selectiveRefresh.Partial}
     546                 * @member {wp.customize.selectiveRefresh.Partial}
    540547                 */
    541548                partial: null,
    … …  
    548555                 * This container element itself will be replaced for partials that
    549556                 * have containerInclusive param defined as true.
     557                 *
     558                 * @member {JQuery}
    550559                 */
    551560                container: null,
    … …  
    557566                 * This is primarily useful for widget sidebars which do not have intrinsic containers, but
    558567                 * for which an HTML comment is output before to mark the starting position.
     568                 *
     569                 * @member {Node}
    559570                 */
    560571                startNode: null,
    … …  
    566577                 * This is primarily useful for widget sidebars which do not have intrinsic containers, but
    567578                 * for which an HTML comment is output before to mark the ending position.
     579                 *
     580                 * @member {Node}
    568581                 */
    569582                endNode: null,
    … …  
    575588                 * in order to render the partial properly.
    576589                 *
    577                  * @param {object}
     590                 * @member {Object}
    578591                 */
    579592                context: null,
    … …  
    582595                 * The content for the partial when refreshed.
    583596                 *
    584                  * @param {string}
     597                 * @member {string|Object|boolean}
    585598                 */
    586599                addedContent: null,
    … …  
    590603                 *
    591604                 * If the partial is containerInclusive, then the removedNodes will be
    592                  * the single Element that was the partial's former placement. If the
     605                 * the jQuery object for the partial's former placement. If the
    593606                 * partial is not containerInclusive, then the removedNodes will be a
    594                  * documentFragment containing the nodes removed.
    595                  *
    596                  * @param {Element|DocumentFragment}
     607                 * DocumentFragment containing the nodes removed.
     608                 *
     609                 * @member {JQuery|DocumentFragment}
    597610                 */
    598611                removedNodes: null,
    … …  
    603616                 * @since 4.5.0
    604617                 *
    605                  * @param {Object}                   args
    606                  * @param {Partial}                  args.partial
    607                  * @param {jQuery|Element}           [args.container]
    608                  * @param {Node}                     [args.startNode]
    609                  * @param {Node}                     [args.endNode]
    610                  * @param {Object}                   [args.context]
    611                  * @param {string}                   [args.addedContent]
    612                  * @param {jQuery|DocumentFragment}  [args.removedNodes]
     618                 * @param {Object}                                args                The placement properties.
     619                 * @param {wp.customize.selectiveRefresh.Partial} args.partial        The partial with which the container is associated.
     620                 * @param {JQuery|Element}                        [args.container]    DOM element which contains the placement's contents.
     621                 * @param {Node}                                  [args.startNode]    DOM node for the initial boundary of the placement.
     622                 * @param {Node}                                  [args.endNode]      DOM node for the terminal boundary of the placement.
     623                 * @param {Object}                                [args.context]      Context data included in the request in order to render the partial.
     624                 * @param {string|Object|boolean}                 [args.addedContent] The content for the partial when refreshed.
     625                 * @param {JQuery|DocumentFragment}               [args.removedNodes] DOM node(s) removed when the partial is refreshed.
    613626                 */
    614627                initialize: function( args ) {
    … …  
    646659         * @see wp.customize.previewer.query()
    647660         *
    648          * @return {Object}
     661         * @return {Object} POST vars for a Customizer preview request.
    649662         */
    650663        self.getCustomizeQuery = function() {
    … …  
    669682         *
    670683         * @since 4.5.0
    671          * @type {Object<string, { deferred: jQuery.Promise, partial: wp.customize.selectiveRefresh.Partial }>}
     684         * @type {Object.<string, { deferred: JQuery.Promise<*>, partial: wp.customize.selectiveRefresh.Partial }>}
    672685         */
    673686        self._pendingPartialRequests = {};
    … …  
    686699         *
    687700         * @since 4.5.0
    688          * @type {jQuery.jqXHR|null}
     701         * @type {JQuery.jqXHR|null}
    689702         * @private
    690703         */
    … …  
    708721         * @since 4.5.0
    709722         *
    710          * @param {wp.customize.selectiveRefresh.Partial} partial
    711          * @return {jQuery.Promise}
     723         * @param {wp.customize.selectiveRefresh.Partial} partial The partial to re-render.
     724         * @return {JQuery.Promise<*>} Promise for the request to render the partial.
    712725         */
    713726        self.requestPartial = function( partial ) {
    … …  
    857870         * @since 4.5.0
    858871         *
    859          * @param {jQuery|HTMLElement} [rootElement]
    860          * @param {object}             [options]
    861          * @param {boolean=true}       [options.triggerRendered]
     872         * @param {JQuery|HTMLElement} [rootElement]                  Element to scan for partials. Defaults to the document element.
     873         * @param {Object}             [options]                      Options.
     874         * @param {boolean}            [options.triggerRendered=true] Whether to trigger the rendered event for the placements found.
    862875         */
    863876        self.addPartials = function( rootElement, options ) {
    … …  
    970983                 * @this {wp.customize.Values}
    971984                 *
    972                  * @param {wp.customize.Setting} setting
     985                 * @param {wp.customize.Setting} setting The setting that was added.
    973986                 */
    974987                watchSettingChange = function( setting ) {
    … …  
    983996                 * @this {wp.customize.Values}
    984997                 *
    985                  * @param {wp.customize.Setting} setting
     998                 * @param {wp.customize.Setting} setting The setting that was removed.
    986999                 */
    9871000                unwatchSettingChange = function( setting ) {
    … …  
    10171030                 * Handle rendering of partials.
    10181031                 *
    1019                  * @param {api.selectiveRefresh.Placement} placement
     1032                 * @param {wp.customize.selectiveRefresh.Placement} placement The placement whose content was rendered.
    10201033                 */
    10211034                api.selectiveRefresh.bind( 'partial-content-rendered', function( placement ) {
    … …  
    10281041                 * Handle setting validities in partial refresh response.
    10291042                 *
    1030                  * @param {object} data Response data.
    1031                  * @param {object} data.setting_validities Setting validities.
     1043                 * @param {Object} data                    Response data.
     1044                 * @param {Object} data.setting_validities Setting validities.
    10321045                 */
    10331046                api.selectiveRefresh.bind( 'render-partials-response', function handleSettingValiditiesResponse( data ) {
Note: See TracChangeset for help on using the changeset viewer.