Debian Codegraph @

extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWGalleryImageCaptionNode.js

raw symbols SCIP
1 /*!
2 * VisualEditor DataModel MWGalleryImageCaptionNode class.
3 *
4 * @copyright See AUTHORS.txt
5 * @license The MIT License (MIT); see LICENSE.txt
6 */
7
8 /**
9 * DataModel gallery image caption node.
10 *
11 * @class
12 * @extends ve.dm.BranchNode
13 *
14 * @constructor
15 * @param {Object} [element] Reference to element in linear model
16 * @param {ve.dm.Node[]} [children]
17 */
18 ve.dm.MWGalleryImageCaptionNode = function VeDmMWGalleryImageCaptionNode() {
19 // Parent constructor
20 ve.dm.MWGalleryImageCaptionNode.super.apply( this, arguments );
21 };
22
23 OO.inheritClass( ve.dm.MWGalleryImageCaptionNode, ve.dm.BranchNode );
24
25 ve.dm.MWGalleryImageCaptionNode.static.name = 'mwGalleryImageCaption';
26
27 ve.dm.MWGalleryImageCaptionNode.static.matchTagNames = [];
28
29 ve.dm.MWGalleryImageCaptionNode.static.parentNodeTypes = [ 'mwGalleryImage' ];
30
31 ve.dm.MWGalleryImageCaptionNode.static.toDomElements = function ( dataElement, doc ) {
32 const div = doc.createElement( 'div' );
33 div.classList.add( 'gallerytext' );
34 return [ div ];
35 };
36
37 /* Registration */
38
39 ve.dm.modelRegistry.register( ve.dm.MWGalleryImageCaptionNode );