mediawiki-extensions-Discus.../modules/HeadingItem.js
Ed Sanders d36ffeaa3d build: Update eslint-config-wikimedia to 0.17.0
Remove variable shadowing, and fix some documentation.

Change-Id: I08a7cbbdc0a1a409f9c4415b36c62c89535e12eb
2020-08-26 23:46:34 +01:00

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;