@@ -324,17 +324,17 @@ function addNewRules() {
324324const observerInit = ( ) => {
325325 observer . init ( {
326326 name : "ccCss" ,
327- observe : [ "childList " ] ,
327+ types : [ "addedNodes " ] ,
328328 selector : "[class]" ,
329329 callback : ( mutation ) => {
330- if ( parse != "false" ) initElements ( mutation . addedNodes ) ;
330+ if ( parse != "false" ) initElements ( [ mutation . target ] ) ;
331331 }
332332 } ) ;
333333
334334 observer . init ( {
335335 name : "ccCss" ,
336- observe : [ "attributes" ] ,
337- attributeName : [ "class" , "className" ] ,
336+ types : [ "attributes" ] ,
337+ attributeFilter : [ "class" , "className" ] ,
338338 callback : ( mutation ) => {
339339 if ( parse != "false" ) initElements ( [ mutation . target ] ) ;
340340 }
@@ -343,20 +343,20 @@ const observerInit = () => {
343343
344344observer . init ( {
345345 name : "cssParseAddedNode" ,
346- observe : [ "addedNodes" ] ,
346+ types : [ "addedNodes" ] ,
347347 selector : "link[parse], link[save], link[object]" ,
348348 callback : ( mutation ) => {
349- init ( mutation . target ) ;
349+ init ( [ mutation . target ] ) ;
350350 }
351351} ) ;
352352
353353observer . init ( {
354354 name : "cssParseattributes" ,
355- observe : [ "attributes" ] ,
356- attributeName : [ "parse" , "save" , "object" ] ,
355+ types : [ "attributes" ] ,
356+ attributeFilter : [ "parse" , "save" , "object" ] ,
357357 selector : "link" ,
358358 callback : ( mutation ) => {
359- init ( mutation . target ) ;
359+ init ( [ mutation . target ] ) ;
360360 }
361361} ) ;
362362
0 commit comments