@gouvfr/dsfr-roller
Version:
Le module `dsfr-roller` permet de publier le site de documentation du Système de Design de l’État - DSFR
16 lines (12 loc) • 404 B
JavaScript
import { TableCellNode } from './table-cell-node.js';
class TableHeaderNode extends TableCellNode {
constructor (data) {
super(data, 'th');
if (this.data.scope) {
this.attributes.setAttribute('scope', this.data.scope);
}
if (this.data.isColumnHeader) this.attributes.setAttribute('role', 'columnheader');
}
}
TableHeaderNode.TYPE = 'tableHeader';
export { TableHeaderNode };