Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7433927
tinyve.dm.ContentBranchNode.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
tinyve.dm.ContentBranchNode.js
View Options
/**
* TinyVE DM ContentBranchNode - Node that contains linearized content, e.g. paragraph
*
* This is a toy version of ve.dm.ContentBranchNode, which illustrates the main concepts
*/
/**
* A ContentBranchNode in the DM tree.
*
* In real VE, each branch node type has its own subclass of `ve.dm.ContentBranchNode`, and the
* subclasses are instantiated through a node factory so extensions can at types.
*
* In real VE, the linearized contents are stored inside `.children` in nodes of type
* `ve.dm.TextNode`, `ve.dm.InlineImageNode` etc. By contrast, `tinyve.dm.ContentBranchNode`
* does not have children (so it's slightly odd that it's a subclass of BranchNode at all).
*
* @class
* @see {ve.dm.ContentBranchNode}
* @see {ve.dm.NodeFactory}
*
* @constructor
* @param {string} type The node type, e.g. 'p' or 'h1'
* @param {tinyve.dm.BranchNode|null} [parent] The parent node, if any
*/
tinyve
.
dm
.
ContentBranchNode
=
function
TinyVeDmContentBranchNode
(
type
,
parent
=
null
)
{
tinyve
.
dm
.
ContentBranchNode
.
super
.
call
(
this
,
type
,
parent
);
};
OO
.
inheritClass
(
tinyve
.
dm
.
ContentBranchNode
,
tinyve
.
dm
.
BranchNode
);
tinyve
.
dm
.
ContentBranchNode
.
prototype
.
canContainContent
=
function
()
{
return
true
;
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 22, 12:09 (1 d, 10 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
af/46/f0b43634604f20143545c0cfe732
Default Alt Text
tinyve.dm.ContentBranchNode.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment