mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-28 18:21:50 +00:00
d36ffeaa3d
Remove variable shadowing, and fix some documentation. Change-Id: I08a7cbbdc0a1a409f9c4415b36c62c89535e12eb
25 lines
617 B
JavaScript
25 lines
617 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;
|