Docs: JSDoc improvements for namespaces.
Improve JS parsing of our inline JSDocs by introducing `@namespace`, `@lends` and `@memberOf`. Helps set the way for showing our JavaScript documentation on developer.wordpress.org, see https://meta.trac.wordpress.org/ticket/3063. * Define all used namespaces using @namespace. * Correctly specify in which namespace each class is using @memberOf. * Define each usage of the extend function as a prototype assignment using @lends. * Some comment blocks were moved to correct the parsing of certain definitions. Props herregroen, atimmer, netweb, SergeyBiryukov. Fixes #41682. Built from https://develop.svn.wordpress.org/trunk@41351 git-svn-id: http://core.svn.wordpress.org/trunk@41184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/* global jQuery, JSON, _customizePartialRefreshExports, console */
|
||||
|
||||
/** @namespace wp.customize.selectiveRefresh */
|
||||
wp.customize.selectiveRefresh = ( function( $, api ) {
|
||||
'use strict';
|
||||
var self, Partial, Placement;
|
||||
@@ -24,6 +25,8 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
|
||||
*
|
||||
* A partial provides a rendering of one or more settings according to a template.
|
||||
*
|
||||
* @memberOf wp.customize.selectiveRefresh
|
||||
*
|
||||
* @see PHP class WP_Customize_Partial.
|
||||
*
|
||||
* @class
|
||||
@@ -39,7 +42,7 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
|
||||
* @param {string} options.params.primarySetting The ID for the primary setting the partial renders.
|
||||
* @param {bool} options.params.fallbackRefresh Whether to refresh the entire preview in case of a partial refresh failure.
|
||||
*/
|
||||
Partial = self.Partial = api.Class.extend({
|
||||
Partial = self.Partial = api.Class.extend(/** @lends wp.customize.SelectiveRefresh.Partial.prototype */{
|
||||
|
||||
id: null,
|
||||
|
||||
@@ -508,11 +511,13 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
|
||||
* It also may have information in relation to how a placement may have just changed.
|
||||
* The placement is conceptually similar to a DOM Range or MutationRecord.
|
||||
*
|
||||
* @class
|
||||
* @memberOf wp.customize.selectiveRefresh
|
||||
*
|
||||
* @class Placement
|
||||
* @augments wp.customize.Class
|
||||
* @since 4.5.0
|
||||
*/
|
||||
self.Placement = Placement = api.Class.extend({
|
||||
self.Placement = Placement = api.Class.extend(/** @lends wp.customize.selectiveRefresh.prototype */{
|
||||
|
||||
/**
|
||||
* The partial with which the container is associated.
|
||||
|
||||
Reference in New Issue
Block a user