Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7403986
ve.dm.MWGalleryCaptionNode.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ve.dm.MWGalleryCaptionNode.js
View Options
/*!
* VisualEditor DataModel MWGalleryCaptionNode class.
*
* @copyright See AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* DataModel gallery caption node.
*
* @class
* @extends ve.dm.BranchNode
*
* @constructor
* @param {Object} [element] Reference to element in linear model
* @param {ve.dm.Node[]} [children]
*/
ve
.
dm
.
MWGalleryCaptionNode
=
function
VeDmMWGalleryCaptionNode
()
{
// Parent constructor
ve
.
dm
.
MWGalleryCaptionNode
.
super
.
apply
(
this
,
arguments
);
};
OO
.
inheritClass
(
ve
.
dm
.
MWGalleryCaptionNode
,
ve
.
dm
.
BranchNode
);
ve
.
dm
.
MWGalleryCaptionNode
.
static
.
name
=
'mwGalleryCaption'
;
ve
.
dm
.
MWGalleryCaptionNode
.
static
.
matchTagNames
=
[
'li'
];
ve
.
dm
.
MWGalleryCaptionNode
.
static
.
matchFunction
=
function
(
element
)
{
const
parentTypeof
=
(
element
.
parentNode
&&
element
.
parentNode
.
getAttribute
(
'typeof'
)
)
||
''
;
return
element
.
getAttribute
(
'class'
)
===
'gallerycaption'
&&
parentTypeof
.
trim
().
split
(
/\s+/
).
includes
(
'mw:Extension/gallery'
);
};
ve
.
dm
.
MWGalleryCaptionNode
.
static
.
parentNodeTypes
=
[
'mwGallery'
];
ve
.
dm
.
MWGalleryCaptionNode
.
static
.
toDomElements
=
function
(
dataElement
,
doc
)
{
const
li
=
doc
.
createElement
(
'li'
);
li
.
classList
.
add
(
'gallerycaption'
);
return
[
li
];
};
/* Registration */
ve
.
dm
.
modelRegistry
.
register
(
ve
.
dm
.
MWGalleryCaptionNode
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 21, 18:54 (1 d, 3 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
d1/cd/1650dce0e8246c5aac83e0c1f6be
Default Alt Text
ve.dm.MWGalleryCaptionNode.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment