mediawiki-extensions-Visual.../modules/ve2/dm/ve.dm.js
Trevor Parscal 042ffb4e3b Added foundation for new converter
* Added converters to all relevant node implementations
* Added new annotation objects with their own factory

Change-Id: I9870d6d5eac45083929d74d2e58917d0939ca917
2012-05-31 16:50:16 -07:00

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;
};