mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-23 10:19:35 +00:00
doc: Get rid of 'static' property container in jsduck index
Us grouping the inheritable static properties that way is an implementation detail that is polluting the index and makes it harder to refer to individual identifiers. It also causes problems under JSDuck 5 because that version is more strict about defining properties (Foo.static.bar) of which the parent is not defined in the index (Foo.static), we'd have to add a sea of `@static @property {Object} this.static` all over the place. Might as well hide this implementation detail and just consider them static properties (just like we already do for "private" properties). Change-Id: Ibf2ebf7752aabc2b75b6ac6fa00e2284a181a600
This commit is contained in:
parent
b1694c6535
commit
4854d644ee
|
@ -129,6 +129,7 @@ here, for consistency. See [JSDuck/Tags](https://github.com/senchalabs/jsduck/wi
|
|||
* @until Text: Optional text.
|
||||
* @source Text
|
||||
* @context {Type} Optional text.
|
||||
* @inheritable
|
||||
* @param {Type} name Optional text.
|
||||
* @emits name
|
||||
* @returns {Type} Optional text.
|
||||
|
|
|
@ -157,7 +157,7 @@ OO.ui.Window.prototype.getWindowSet = function () {
|
|||
/**
|
||||
* Get the title of the window.
|
||||
*
|
||||
* Use .static.titleMessage to set this unless you need to do something fancy.
|
||||
* Use #titleMessage to set this unless you need to do something fancy.
|
||||
* @returns {string} Window title
|
||||
*/
|
||||
OO.ui.Window.prototype.getTitle = function () {
|
||||
|
@ -187,7 +187,7 @@ OO.ui.Window.prototype.setSize = function ( width, height ) {
|
|||
/**
|
||||
* Set the title of the window.
|
||||
*
|
||||
* @param {string} [customTitle] Custom title, override the static.titleMessage
|
||||
* @param {string} [customTitle] Custom title, override the #titleMessage
|
||||
* @chainable
|
||||
*/
|
||||
OO.ui.Window.prototype.setTitle = function ( customTitle ) {
|
||||
|
|
|
@ -43,7 +43,7 @@ ve.dm.MWExtensionNode.static.tagName = null;
|
|||
/**
|
||||
* Name of the extension and the parser tag name.
|
||||
* @static
|
||||
* @property {string} static.extensionName
|
||||
* @property {string}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.MWExtensionNode.static.extensionName = null;
|
||||
|
|
|
@ -43,8 +43,8 @@ ve.ce.Annotation.static.tagName = 'span';
|
|||
* This should be set to true only for annotations that aren't continued by browsers but are in DM,
|
||||
* or the other way around, or those where behavior is inconsistent between browsers.
|
||||
*
|
||||
* @property static.forceContinuation
|
||||
* @static
|
||||
* @property
|
||||
* @inheritable
|
||||
*/
|
||||
ve.ce.Annotation.static.forceContinuation = false;
|
||||
|
|
|
@ -42,7 +42,7 @@ OO.mixinClass( ve.ce.Node, ve.Node );
|
|||
* if splittable, and continue traversing up the tree and stop at the first non-splittable node.
|
||||
*
|
||||
* @static
|
||||
* @property static.canBeSplit
|
||||
* @property
|
||||
* @inheritable
|
||||
*/
|
||||
ve.ce.Node.static.canBeSplit = false;
|
||||
|
@ -51,11 +51,12 @@ ve.ce.Node.static.canBeSplit = false;
|
|||
* Whether this node type can be focused.
|
||||
*
|
||||
* If this is set to true on a node, it should implement:
|
||||
*
|
||||
* setFocused( boolean val )
|
||||
* boolean isFocused()
|
||||
*
|
||||
* @static
|
||||
* @property static.isFocusable
|
||||
* @property
|
||||
* @inheritable
|
||||
*/
|
||||
ve.ce.Node.static.isFocusable = false;
|
||||
|
@ -67,7 +68,6 @@ ve.ce.Node.static.isFocusable = false;
|
|||
*
|
||||
* This method passes through to the model.
|
||||
*
|
||||
* @method
|
||||
* @returns {string[]|null} List of node types allowed as children or null if any type is allowed
|
||||
*/
|
||||
ve.ce.Node.prototype.getChildNodeTypes = function () {
|
||||
|
@ -79,7 +79,6 @@ ve.ce.Node.prototype.getChildNodeTypes = function () {
|
|||
*
|
||||
* This method passes through to the model.
|
||||
*
|
||||
* @method
|
||||
* @returns {string[]|null} List of node types allowed as parents or null if any type is allowed
|
||||
*/
|
||||
ve.ce.Node.prototype.getParentNodeTypes = function () {
|
||||
|
@ -91,7 +90,6 @@ ve.ce.Node.prototype.getParentNodeTypes = function () {
|
|||
*
|
||||
* This method passes through to the model.
|
||||
*
|
||||
* @method
|
||||
* @returns {boolean} Model node can have children
|
||||
*/
|
||||
ve.ce.Node.prototype.canHaveChildren = function () {
|
||||
|
@ -103,7 +101,6 @@ ve.ce.Node.prototype.canHaveChildren = function () {
|
|||
*
|
||||
* This method passes through to the model.
|
||||
*
|
||||
* @method
|
||||
* @returns {boolean} Model node can have children but not content nor be content
|
||||
*/
|
||||
ve.ce.Node.prototype.canHaveChildrenNotContent = function () {
|
||||
|
@ -115,7 +112,6 @@ ve.ce.Node.prototype.canHaveChildrenNotContent = function () {
|
|||
*
|
||||
* This method passes through to the model.
|
||||
*
|
||||
* @method
|
||||
* @returns {boolean} Model node is a wrapped element
|
||||
*/
|
||||
ve.ce.Node.prototype.isWrapped = function () {
|
||||
|
@ -127,7 +123,6 @@ ve.ce.Node.prototype.isWrapped = function () {
|
|||
*
|
||||
* This method passes through to the model.
|
||||
*
|
||||
* @method
|
||||
* @returns {boolean} Node can contain content
|
||||
*/
|
||||
ve.ce.Node.prototype.canContainContent = function () {
|
||||
|
@ -139,7 +134,6 @@ ve.ce.Node.prototype.canContainContent = function () {
|
|||
*
|
||||
* This method passes through to the model.
|
||||
*
|
||||
* @method
|
||||
* @returns {boolean} Node is content
|
||||
*/
|
||||
ve.ce.Node.prototype.isContent = function () {
|
||||
|
@ -149,7 +143,7 @@ ve.ce.Node.prototype.isContent = function () {
|
|||
/**
|
||||
* Check if the node is focusable
|
||||
*
|
||||
* @see #static.isFocusable
|
||||
* @see #static-isFocusable
|
||||
* @returns {boolean} Node is focusable
|
||||
*/
|
||||
ve.ce.Node.prototype.isFocusable = function () {
|
||||
|
@ -161,7 +155,6 @@ ve.ce.Node.prototype.isFocusable = function () {
|
|||
*
|
||||
* TODO: Figure out a way to remove the hard-coding for text nodes here.
|
||||
*
|
||||
* @static
|
||||
* @method
|
||||
* @returns {boolean} Whether the node can have a slug before it
|
||||
*/
|
||||
|
@ -175,7 +168,6 @@ ve.ce.Node.prototype.canHaveSlugBefore = function () {
|
|||
/**
|
||||
* Check if the node can have a slug after it.
|
||||
*
|
||||
* @static
|
||||
* @method
|
||||
* @returns {boolean} Whether the node can have a slug after it
|
||||
*/
|
||||
|
@ -186,7 +178,6 @@ ve.ce.Node.prototype.canHaveSlugAfter = ve.ce.Node.prototype.canHaveSlugBefore;
|
|||
*
|
||||
* This method passes through to the model.
|
||||
*
|
||||
* @method
|
||||
* @returns {number} Model length
|
||||
*/
|
||||
ve.ce.Node.prototype.getLength = function () {
|
||||
|
@ -198,7 +189,6 @@ ve.ce.Node.prototype.getLength = function () {
|
|||
*
|
||||
* This method passes through to the model.
|
||||
*
|
||||
* @method
|
||||
* @returns {number} Model outer length
|
||||
*/
|
||||
ve.ce.Node.prototype.getOuterLength = function () {
|
||||
|
@ -218,7 +208,6 @@ ve.ce.Node.prototype.getOffset = function () {
|
|||
/**
|
||||
* Check if the node can be split.
|
||||
*
|
||||
* @method
|
||||
* @returns {boolean} Node can be split
|
||||
*/
|
||||
ve.ce.Node.prototype.canBeSplit = function () {
|
||||
|
@ -228,7 +217,6 @@ ve.ce.Node.prototype.canBeSplit = function () {
|
|||
/**
|
||||
* Get the closest splittable node upstream.
|
||||
*
|
||||
* @method
|
||||
* @returns {ve.ce.Node} Closest splittable node
|
||||
*/
|
||||
ve.ce.Node.getSplitableNode = function ( node ) {
|
||||
|
@ -248,8 +236,6 @@ ve.ce.Node.getSplitableNode = function ( node ) {
|
|||
|
||||
/**
|
||||
* Release all memory.
|
||||
*
|
||||
* @method
|
||||
*/
|
||||
ve.ce.Node.prototype.destroy = function () {
|
||||
this.parent = null;
|
||||
|
|
|
@ -65,7 +65,7 @@ OO.mixinClass( ve.ce.View, OO.EventEmitter );
|
|||
/* Static members */
|
||||
|
||||
/**
|
||||
* Allowed attributes for DOM elements, in the same format as ve.dm.Model#static.storeHtmlAttributes
|
||||
* Allowed attributes for DOM elements, in the same format as ve.dm.Model#storeHtmlAttributes
|
||||
*
|
||||
* This list includes attributes that are generally safe to include in HTML loaded from a
|
||||
* foreign source and displaying it inside the browser. It doesn't include any event attributes,
|
||||
|
@ -76,7 +76,7 @@ OO.mixinClass( ve.ce.View, OO.EventEmitter );
|
|||
* sense for that view in particular.
|
||||
*
|
||||
* @static
|
||||
* @property {boolean|string|RegExp|Array|Object} static.renderHtmlAttributes
|
||||
* @property {boolean|string|RegExp|Array|Object}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.ce.View.static.renderHtmlAttributes = [
|
||||
|
|
|
@ -36,7 +36,7 @@ OO.inheritClass( ve.dm.Annotation, ve.dm.Model );
|
|||
* About grouping is not supported for annotations; setting this to true has no effect.
|
||||
*
|
||||
* @static
|
||||
* @property {boolean} static.enableAboutGrouping
|
||||
* @property {boolean}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Annotation.static.enableAboutGrouping = false;
|
||||
|
@ -44,7 +44,7 @@ ve.dm.Annotation.static.enableAboutGrouping = false;
|
|||
/**
|
||||
* Automatically apply annotation to content inserted after it.
|
||||
*
|
||||
* @type {boolean}
|
||||
* @property {boolean}
|
||||
*/
|
||||
ve.dm.Annotation.static.applyToAppendedContent = true;
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ OO.mixinClass( ve.dm.MetaItem, OO.EventEmitter );
|
|||
* Symbolic name for the group this meta item type will be grouped in in ve.dm.MetaList.
|
||||
*
|
||||
* @static
|
||||
* @property {string} [static.group='misc']
|
||||
* @property
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.MetaItem.static.group = 'misc';
|
||||
|
@ -77,7 +77,7 @@ ve.dm.MetaItem.prototype.replaceWith = function ( item ) {
|
|||
|
||||
/**
|
||||
* Get the group this meta item belongs to.
|
||||
* @see ve.dm.MetaItem#static.group
|
||||
* @see #static-group
|
||||
* @returns {string} Group
|
||||
*/
|
||||
ve.dm.MetaItem.prototype.getGroup = function () {
|
||||
|
|
|
@ -31,7 +31,7 @@ ve.dm.Model.static = {};
|
|||
/**
|
||||
* Symbolic name for this model class. Must be set to a unique string by every subclass.
|
||||
* @static
|
||||
* @property {string} [static.name=null]
|
||||
* @property {string}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Model.static.name = null;
|
||||
|
@ -41,7 +41,7 @@ ve.dm.Model.static.name = null;
|
|||
* Empty array means none, null means any.
|
||||
* For more information about element matching, see ve.dm.ModelRegistry.
|
||||
* @static
|
||||
* @property {string[]} static.matchTagNames
|
||||
* @property {string[]}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Model.static.matchTagNames = null;
|
||||
|
@ -51,7 +51,7 @@ ve.dm.Model.static.matchTagNames = null;
|
|||
* Empty array means none, null means any.
|
||||
* For more information about element matching, see ve.dm.ModelRegistry.
|
||||
* @static
|
||||
* @property {Array} static.matchRdfaType Array of strings or regular expressions
|
||||
* @property {Array}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Model.static.matchRdfaTypes = null;
|
||||
|
@ -68,7 +68,7 @@ ve.dm.Model.static.matchRdfaTypes = null;
|
|||
* NOTE: This function is NOT a method, within this function "this" will not refer to an instance
|
||||
* of this class (or to anything reasonable, for that matter).
|
||||
* @static
|
||||
* @property {Function} static.matchFunction
|
||||
* @property {Function}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Model.static.matchFunction = null;
|
||||
|
@ -168,7 +168,7 @@ ve.dm.Model.static.toDomElements = function ( /*dataElement, doc, converter*/ )
|
|||
* be childless.
|
||||
*
|
||||
* @static
|
||||
* @property {boolean} static.enableAboutGrouping
|
||||
* @property {boolean}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Model.static.enableAboutGrouping = false;
|
||||
|
@ -198,7 +198,7 @@ ve.dm.Model.static.enableAboutGrouping = false;
|
|||
* do not match the blacklist will be preserved.
|
||||
*
|
||||
* @static
|
||||
* @property {boolean|string|RegExp|Array|Object} static.storeHtmlAttributes
|
||||
* @property {boolean|string|RegExp|Array|Object}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Model.static.storeHtmlAttributes = true;
|
||||
|
@ -209,7 +209,7 @@ ve.dm.Model.static.storeHtmlAttributes = true;
|
|||
* Determine whether an attribute name matches an attribute specification.
|
||||
*
|
||||
* @param {string} attribute Attribute name
|
||||
* @param {boolean|string|RegExp|Array|Object} spec Attribute specification, see ve.dm.Model.static.storeHtmlAttributes
|
||||
* @param {boolean|string|RegExp|Array|Object} spec Attribute specification, see #storeHtmlAttributes
|
||||
* @returns {boolean} Attribute matches spec
|
||||
*/
|
||||
ve.dm.Model.matchesAttributeSpec = function ( attribute, spec ) {
|
||||
|
|
|
@ -63,7 +63,7 @@ OO.mixinClass( ve.dm.Node, OO.EventEmitter );
|
|||
* If .static.childNodeTypes is set to [], this property is ignored and will be assumed to be true.
|
||||
*
|
||||
* @static
|
||||
* @property {boolean} static.handlesOwnChildren
|
||||
* @property {boolean}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Node.static.handlesOwnChildren = false;
|
||||
|
@ -72,7 +72,7 @@ ve.dm.Node.static.handlesOwnChildren = false;
|
|||
* Whether this node type is internal. Internal node types are ignored by the converter.
|
||||
*
|
||||
* @static
|
||||
* @property {boolean} static.isInternal
|
||||
* @property {boolean}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Node.static.isInternal = false;
|
||||
|
@ -82,7 +82,7 @@ ve.dm.Node.static.isInternal = false;
|
|||
* only special node types are not wrapped.
|
||||
*
|
||||
* @static
|
||||
* @property {boolean} static.isWrapped
|
||||
* @property {boolean}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Node.static.isWrapped = true;
|
||||
|
@ -93,7 +93,7 @@ ve.dm.Node.static.isWrapped = true;
|
|||
* also known as inline nodes.
|
||||
*
|
||||
* @static
|
||||
* @property {boolean} static.isContent
|
||||
* @property {boolean}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Node.static.isContent = false;
|
||||
|
@ -103,7 +103,7 @@ ve.dm.Node.static.isContent = false;
|
|||
* content nodes.
|
||||
*
|
||||
* @static
|
||||
* @property {boolean} static.canContainContent
|
||||
* @property {boolean}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Node.static.canContainContent = false;
|
||||
|
@ -116,7 +116,7 @@ ve.dm.Node.static.canContainContent = false;
|
|||
* stripping and preservation.
|
||||
*
|
||||
* @static
|
||||
* @property {boolean} static.hasSignificantWhitespace
|
||||
* @property {boolean}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Node.static.hasSignificantWhitespace = false;
|
||||
|
@ -127,7 +127,7 @@ ve.dm.Node.static.hasSignificantWhitespace = false;
|
|||
* An empty array means no children are allowed. null means any node type is allowed as a child.
|
||||
*
|
||||
* @static
|
||||
* @property {string[]|null} static.childNodeTypes
|
||||
* @property {string[]|null}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Node.static.childNodeTypes = null;
|
||||
|
@ -139,7 +139,7 @@ ve.dm.Node.static.childNodeTypes = null;
|
|||
* can be the child of any node type.
|
||||
*
|
||||
* @static
|
||||
* @property {string[]|null} static.parentNodeTypes
|
||||
* @property {string[]|null}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Node.static.parentNodeTypes = null;
|
||||
|
@ -153,7 +153,7 @@ ve.dm.Node.static.parentNodeTypes = null;
|
|||
* can be the child of any node type.
|
||||
*
|
||||
* @static
|
||||
* @property {string[]|null} static.suggestedParentNodeTypes
|
||||
* @property {string[]|null}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Node.static.suggestedParentNodeTypes = null;
|
||||
|
@ -162,7 +162,7 @@ ve.dm.Node.static.suggestedParentNodeTypes = null;
|
|||
* Array of annotation types which can't be applied to this node
|
||||
*
|
||||
* @static
|
||||
* @property {string[]} static.blacklistedAnnotationTypes
|
||||
* @property {string[]}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Node.static.blacklistedAnnotationTypes = [];
|
||||
|
@ -176,7 +176,7 @@ ve.dm.Node.static.blacklistedAnnotationTypes = [];
|
|||
* Attributes may be omitted, in which case they'll simply be undefined.
|
||||
*
|
||||
* @static
|
||||
* @property {Object} static.defaultAttributes
|
||||
* @property {Object}
|
||||
* @inheritable
|
||||
*/
|
||||
ve.dm.Node.static.defaultAttributes = {};
|
||||
|
|
Loading…
Reference in a new issue