Expand all

abstract ve.dm.MWExtensionNode

Extends

Constructor

new ve.dm.MWExtensionNode()abstract #

DataModel MediaWiki extension node.

Properties

extensionNamestatic #

Name of the MediaWiki parser extension tag. (Not related to the name of the MediaWiki extension.)

Properties:

Type Description
string
Source:
Name of the MediaWiki parser extension tag.

tagNamestatic #

HTML tag name.

Properties:

Type Description
string
Source:
HTML tag name.

usesSourceAsPlainTextstatic #

Whether the extension renders its own source, as

 and  do.

Only such nodes can give a plain text value, because the source is then what the user sees. Leave this false where the two differ, e.g. a reference or a graph: the source is not a substitute for the rendering, so the node has no plain text.

Properties:

Type Description
boolean
Source:
Whether the extension renders its own source, as
 and  do.

Methods

getExtensionName() → {string} #

Get name of the MediaWiki parser extension tag.

Returns:

Extension name

Type
string
Source:
Get name of the MediaWiki parser extension tag.

getExtensionName(dataElement) → {string}static #

Get name of the MediaWiki parser extension tag.

Static version for toDomElements

Parameters:

Name Type Description
dataElement Object

Data element

Returns:

Extension name

Type
string
Source:
Get name of the MediaWiki parser extension tag.

toDataElement(domElements, converter, [type])static #

Parameters:

Name Type Attributes Description
domElements Array.<Node>
converter ve.dm.ModelFromDomConverter
type string optional

Type to give dataElement, defaults to static.name

Source: