mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-28 18:21:50 +00:00
d5376e28fc
Change-Id: Ia266fc22b02af0edbb32f356b4e0d92fe3a4da5f
25 lines
619 B
JavaScript
25 lines
619 B
JavaScript
var ThreadItem = require( './ThreadItem.js' );
|
|
|
|
/**
|
|
* A heading item
|
|
*
|
|
* @class HeadingItem
|
|
* @extends {ThreadItem}
|
|
* @constructor
|
|
* @param {Object} range
|
|
* @param {boolean} [placeholderHeading] Item doesn't correspond to a real heading (e.g. 0th section)
|
|
*/
|
|
function HeadingItem( range, placeholderHeading ) {
|
|
// Parent constructor
|
|
HeadingItem.super.call( this, 'heading', 0, range );
|
|
|
|
// TODO: Should probably always initialise, but our tests assert it is unset
|
|
if ( placeholderHeading ) {
|
|
this.placeholderHeading = true;
|
|
}
|
|
}
|
|
|
|
OO.inheritClass( HeadingItem, ThreadItem );
|
|
|
|
module.exports = HeadingItem;
|