Debian Codegraph @

extensions/VisualEditor/lib/ve/src/dm/nodes/ve.dm.DocumentNode.js

raw symbols SCIP
1 /*!
2 * VisualEditor DataModel DocumentNode class.
3 *
4 * @copyright See AUTHORS.txt
5 */
6
7 /**
8 * DataModel document node.
9 *
10 * @class
11 * @extends ve.dm.BranchNode
12 *
13 * @constructor
14 * @param {ve.dm.BranchNode[]} [children] Child nodes to attach
15 */
16 ve.dm.DocumentNode = function VeDmDocumentNode( children ) {
17 // Parent constructor
18 ve.dm.DocumentNode.super.call( this, null, children );
19
20 // Properties
21 this.root = this;
22 };
23
24 /* Inheritance */
25
26 OO.inheritClass( ve.dm.DocumentNode, ve.dm.BranchNode );
27
28 /* Static Properties */
29
30 ve.dm.DocumentNode.static.name = 'document';
31
32 ve.dm.DocumentNode.static.isWrapped = false;
33
34 ve.dm.DocumentNode.static.parentNodeTypes = [];
35
36 ve.dm.DocumentNode.static.matchTagNames = [];
37
38 /* Methods */
39
40 ve.dm.DocumentNode.prototype.getElement =
41 ve.dm.DocumentNode.prototype.getAttribute =
42 ve.dm.DocumentNode.prototype.getAttributes =
43 ve.dm.DocumentNode.prototype.getOriginalDomElements =
44 ve.dm.DocumentNode.prototype.getClonedElement =
45 ve.dm.DocumentNode.prototype.getHashObject = function () {
46 throw new Error( 'DocumentNodes do not exist in the linear model' );
47 };
48
49 /* Registration */
50
51 ve.dm.modelRegistry.register( ve.dm.DocumentNode );