Remove calls to DOM.addClass and DOM.removeClass (#13063)

This commit is contained in:
Charles Gagnon
2020-10-23 14:42:22 -07:00
committed by GitHub
parent c7ab69d46d
commit 2d182fcd03
24 changed files with 89 additions and 93 deletions

View File

@@ -217,8 +217,8 @@ export class TabbedPanel extends Disposable {
if (this._shownTabId) {
const shownTab = this._tabMap.get(this._shownTabId);
if (shownTab) {
DOM.removeClass(shownTab.label, 'active');
DOM.removeClass(shownTab.header, 'active');
shownTab.label.classList.remove('active');
shownTab.header.classList.remove('active');
shownTab.header.setAttribute('aria-selected', 'false');
if (shownTab.body) {
shownTab.body.remove();
@@ -246,8 +246,8 @@ export class TabbedPanel extends Disposable {
}
this.body.appendChild(tab.body);
this.body.setAttribute('aria-labelledby', tab.tab.identifier);
DOM.addClass(tab.label, 'active');
DOM.addClass(tab.header, 'active');
tab.label.classList.add('active');
tab.header.classList.add('active');
tab.header.setAttribute('aria-selected', 'true');
this._onTabChange.fire(id);
if (tab.tab.view.onShow) {