mediawiki-extensions-Visual.../modules/ve/dm/metaitems/ve.dm.MWAlienMetaItem.js
Ed Sanders 59bfc081df Store alien meta items' dom nodes only
We don't need to decompose and rebuild alien meta items
as they are uneditable, so just store the dom node and return that
in toDomElements.

Update test cases and several tests now need to use
assert.deepEqualWithDomElements.

Change-Id: I4d2eed267dac7855cb929a17d7aef566eaf0e287
2013-06-12 16:37:37 +01:00

41 lines
1 KiB
JavaScript

/*!
* VisualEditor DataModel MWAlienMetaItem class.
*
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* DataModel MW-specific meta item.
*
* @class
* @abstract
* @extends ve.dm.AlienMetaItem
* @constructor
* @param {Object} element Reference to element in meta-linmod
*/
ve.dm.MWAlienMetaItem = function VeDmMWAlienMetaItem( element ) {
// Parent constructor
ve.dm.AlienMetaItem.call( this, element );
};
/* Inheritance */
ve.inheritClass( ve.dm.MWAlienMetaItem, ve.dm.AlienMetaItem );
/* Static Properties */
ve.dm.MWAlienMetaItem.static.name = 'mwAlienMeta';
ve.dm.MWAlienMetaItem.static.matchRdfaTypes = [
/^mw:/
];
// toDataElement inherited from AlienMetaItem, will return regular alienMeta elements but
// that's fine. This class is only here so that <meta>/<link> tags with an mw: type are correctly
// mapped to AlienMetaItem rather than AlienNode.
/* Registration */
ve.dm.modelRegistry.register( ve.dm.MWAlienMetaItem );