mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 02:51:50 +00:00
042ffb4e3b
* Added converters to all relevant node implementations * Added new annotation objects with their own factory Change-Id: I9870d6d5eac45083929d74d2e58917d0939ca917
21 lines
507 B
JavaScript
21 lines
507 B
JavaScript
/**
|
|
* DataModel namespace.
|
|
*
|
|
* All classes and functions will be attached to this object to keep the global namespace clean.
|
|
*/
|
|
ve.dm = {
|
|
//'nodeFactory': Initialized in ve.dm.NodeFactory.js
|
|
//'converter': Initialized in ve.dm.Converter.js
|
|
};
|
|
|
|
ve.dm.createHtmlElement = function( type, attributes, doc ) {
|
|
if ( doc === undefined ) {
|
|
doc = document;
|
|
}
|
|
var element = doc.createElement( type );
|
|
for ( var key in attributes ) {
|
|
element.setAttribute( key, attributes[key] );
|
|
}
|
|
return element;
|
|
};
|