@@ -33,7 +33,7 @@ import { HTMLMathList } from './HTMLMathList.js';
3333import { HTMLDomStrings } from './HTMLDomStrings.js' ;
3434import { DOMAdaptor } from '../../core/DOMAdaptor.js' ;
3535import { InputJax } from '../../core/InputJax.js' ;
36- import { STATE , ProtoItem , Location } from '../../core/MathItem.js' ;
36+ import { STATE , newState , ProtoItem , Location } from '../../core/MathItem.js' ;
3737import { StyleJson } from '../../util/StyleJson.js' ;
3838
3939/*****************************************************************/
@@ -49,6 +49,11 @@ import { StyleJson } from '../../util/StyleJson.js';
4949 */
5050export type HTMLNodeArray < N , T > = [ N | T , number ] [ ] [ ] ;
5151
52+ /**
53+ * Add STATE value for adding the stylesheets (after INSERTED)
54+ */
55+ newState ( 'STYLES' , STATE . INSERTED + 1 ) ;
56+
5257/*****************************************************************/
5358/**
5459 * The HTMLDocument class (extends AbstractMathDocument)
@@ -71,7 +76,7 @@ export class HTMLDocument<N, T, D> extends AbstractMathDocument<N, T, D> {
7176 ...AbstractMathDocument . OPTIONS ,
7277 renderActions : expandable ( {
7378 ...AbstractMathDocument . OPTIONS . renderActions ,
74- styles : [ STATE . INSERTED + 1 , '' , 'updateStyleSheet' , false ] // update styles on a rerender() call
79+ styles : [ STATE . STYLES , '' , 'updateStyleSheet' , false ] // update styles on a rerender() call
7580 } ) ,
7681 MathList : HTMLMathList , // Use the HTMLMathList for MathLists
7782 MathItem : HTMLMathItem , // Use the HTMLMathItem for MathItem
0 commit comments