2013-11-15 20:02:34 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor DataModel MWNoEditSectionMetaItem class.
|
|
|
|
*
|
2023-12-01 16:06:11 +00:00
|
|
|
* @copyright See AUTHORS.txt
|
2013-11-15 20:02:34 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* DataModel disable section edit links meta item.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends ve.dm.MetaItem
|
|
|
|
* @constructor
|
|
|
|
* @param {Object} element Reference to element in meta-linmod
|
|
|
|
*/
|
2016-08-22 21:44:59 +00:00
|
|
|
ve.dm.MWNoEditSectionMetaItem = function VeDmMWNoEditSectionMetaItem() {
|
2013-11-15 20:02:34 +00:00
|
|
|
// Parent constructor
|
2016-08-22 21:44:59 +00:00
|
|
|
ve.dm.MWNoEditSectionMetaItem.super.apply( this, arguments );
|
2013-11-15 20:02:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.dm.MWNoEditSectionMetaItem, ve.dm.MetaItem );
|
|
|
|
|
|
|
|
/* Static Properties */
|
|
|
|
|
|
|
|
ve.dm.MWNoEditSectionMetaItem.static.name = 'mwNoEditSection';
|
|
|
|
|
|
|
|
ve.dm.MWNoEditSectionMetaItem.static.group = 'mwNoEditSection';
|
|
|
|
|
|
|
|
ve.dm.MWNoEditSectionMetaItem.static.matchTagNames = [ 'meta' ];
|
|
|
|
|
|
|
|
ve.dm.MWNoEditSectionMetaItem.static.matchRdfaTypes = [ 'mw:PageProp/noeditsection' ];
|
|
|
|
|
|
|
|
ve.dm.MWNoEditSectionMetaItem.static.toDomElements = function ( dataElement, doc ) {
|
2024-05-21 14:22:56 +00:00
|
|
|
const meta = doc.createElement( 'meta' );
|
2013-11-15 20:02:34 +00:00
|
|
|
meta.setAttribute( 'property', 'mw:PageProp/noeditsection' );
|
|
|
|
return [ meta ];
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.dm.modelRegistry.register( ve.dm.MWNoEditSectionMetaItem );
|