@@ -298,7 +298,7 @@ let observerInit = new Map();
298
298
function observerElements ( initWindow ) {
299
299
initWindow . parent . CoCreate . observer . init ( {
300
300
name : "ccAttribute" ,
301
- observe : [ "attributes" ] , // "characterData"
301
+ types : [ "attributes" ] , // "characterData"
302
302
callback : ( mutation ) => {
303
303
if ( mutation . attributeName != "attribute-unit" ) return ;
304
304
let inputs = getInputFromElement (
@@ -635,27 +635,27 @@ init();
635
635
636
636
observer . init ( {
637
637
name : "ccAttribute" ,
638
- observe : [ "childList " ] ,
638
+ types : [ "addedNodes " ] ,
639
639
selector : "[attribute]" ,
640
640
callback : function ( mutation ) {
641
- initElements ( mutation . addedNodes ) ;
641
+ initElement ( mutation . target ) ;
642
642
}
643
643
} ) ;
644
644
645
645
observer . init ( {
646
646
name : "ccAttribute" ,
647
- observe : [ "attributes" ] ,
648
- attributeName : [ "attribute-selector" ] ,
647
+ types : [ "attributes" ] ,
648
+ attributeFilter : [ "attribute-selector" ] ,
649
649
callback : function ( mutation ) {
650
650
initElement ( mutation . target ) ;
651
651
}
652
652
} ) ;
653
653
654
654
observer . init ( {
655
655
name : "ccAttribute" ,
656
- observe : [ "attributes" ] ,
657
- // attributeName : ["attribute", "attribute-property", "attribute-unit", "value"],
658
- attributeName : [ "attribute-unit" ] ,
656
+ types : [ "attributes" ] ,
657
+ // attributeFilter : ["attribute", "attribute-property", "attribute-unit", "value"],
658
+ attributeFilter : [ "attribute-unit" ] ,
659
659
callback : function ( mutation ) {
660
660
updateElement ( { input : mutation . target , isColl : true } ) ;
661
661
if ( mutation . attributeName != "attribute-unit" ) return ;
0 commit comments