@@ -99,15 +99,15 @@ class PropertyHeader extends Disposable {
9999 buildHeader ( ) : void {
100100 let metadataChanged = this . accessor . checkIfModified ( this . cell ) ;
101101 this . _foldingIndicator = DOM . append ( this . metadataHeaderContainer , DOM . $ ( '.property-folding-indicator' ) ) ;
102- DOM . addClass ( this . _foldingIndicator , this . accessor . prefix ) ;
102+ this . _foldingIndicator . classList . add ( this . accessor . prefix ) ;
103103 this . _updateFoldingIcon ( ) ;
104104 const metadataStatus = DOM . append ( this . metadataHeaderContainer , DOM . $ ( 'div.property-status' ) ) ;
105105 this . _statusSpan = DOM . append ( metadataStatus , DOM . $ ( 'span' ) ) ;
106106
107107 if ( metadataChanged ) {
108108 this . _statusSpan . textContent = this . accessor . changedLabel ;
109109 this . _statusSpan . style . fontWeight = 'bold' ;
110- DOM . addClass ( this . metadataHeaderContainer , 'modified' ) ;
110+ this . metadataHeaderContainer . classList . add ( 'modified' ) ;
111111 } else {
112112 this . _statusSpan . textContent = this . accessor . unChangedLabel ;
113113 }
@@ -149,7 +149,7 @@ class PropertyHeader extends Disposable {
149149 return ;
150150 }
151151
152- if ( ! DOM . hasClass ( parent , this . accessor . prefix ) ) {
152+ if ( ! parent . classList . contains ( this . accessor . prefix ) ) {
153153 return ;
154154 }
155155
@@ -181,7 +181,7 @@ class PropertyHeader extends Disposable {
181181 if ( metadataChanged ) {
182182 this . _statusSpan . textContent = this . accessor . changedLabel ;
183183 this . _statusSpan . style . fontWeight = 'bold' ;
184- DOM . addClass ( this . metadataHeaderContainer , 'modified' ) ;
184+ this . metadataHeaderContainer . classList . add ( 'modified' ) ;
185185 const actions : IAction [ ] = [ ] ;
186186 createAndFillInActionBarActions ( this . _menu , undefined , actions ) ;
187187 this . _toolbar . setActions ( actions ) ;
@@ -264,13 +264,13 @@ abstract class AbstractCellRenderer extends Disposable {
264264 this . _diffEditorContainer = DOM . $ ( '.cell-diff-editor-container' ) ;
265265 switch ( this . style ) {
266266 case 'left' :
267- DOM . addClass ( body , 'left' ) ;
267+ body . classList . add ( 'left' ) ;
268268 break ;
269269 case 'right' :
270- DOM . addClass ( body , 'right' ) ;
270+ body . classList . add ( 'right' ) ;
271271 break ;
272272 default :
273- DOM . addClass ( body , 'full' ) ;
273+ body . classList . add ( 'full' ) ;
274274 break ;
275275 }
276276
@@ -507,7 +507,7 @@ abstract class AbstractCellRenderer extends Disposable {
507507 ignoreTrimWhitespace : false
508508 } ) ;
509509
510- DOM . addClass ( this . _metadataEditorContainer ! , 'diff' ) ;
510+ this . _metadataEditorContainer ?. classList . add ( 'diff' ) ;
511511
512512 const mode = this . modeService . create ( 'json' ) ;
513513 const originalMetadataModel = this . modelService . createModel ( originalMetadataSource , mode , CellUri . generateCellMetadataUri ( this . cell . original ! . uri , this . cell . original ! . handle ) , false ) ;
@@ -611,7 +611,7 @@ abstract class AbstractCellRenderer extends Disposable {
611611 ignoreTrimWhitespace : false
612612 } ) ;
613613
614- DOM . addClass ( this . _outputEditorContainer ! , 'diff' ) ;
614+ this . _outputEditorContainer ?. classList . add ( 'diff' ) ;
615615
616616 const mode = this . modeService . create ( 'json' ) ;
617617 const originalModel = this . modelService . createModel ( originalOutputsSource , mode , undefined , true ) ;
@@ -708,7 +708,7 @@ export class DeletedCell extends AbstractCellRenderer {
708708 }
709709
710710 styleContainer ( container : HTMLElement ) {
711- DOM . addClass ( container , 'removed' ) ;
711+ container . classList . add ( 'removed' ) ;
712712 }
713713
714714 buildSourceEditor ( sourceContainer : HTMLElement ) : void {
@@ -795,7 +795,7 @@ export class InsertCell extends AbstractCellRenderer {
795795 }
796796
797797 styleContainer ( container : HTMLElement ) : void {
798- DOM . addClass ( container , 'inserted' ) ;
798+ container . classList . add ( 'inserted' ) ;
799799 }
800800
801801 buildSourceEditor ( sourceContainer : HTMLElement ) : void {
@@ -899,7 +899,7 @@ export class ModifiedCell extends AbstractCellRenderer {
899899 originalEditable : false ,
900900 ignoreTrimWhitespace : false
901901 } ) ;
902- DOM . addClass ( this . _editorContainer , 'diff' ) ;
902+ this . _editorContainer . classList . add ( 'diff' ) ;
903903
904904 this . _editor . layout ( {
905905 width : this . notebookEditor . getLayoutInfo ( ) . width - 2 * DIFF_CELL_MARGIN ,
0 commit comments