@@ -298,7 +298,7 @@ let observerInit = new Map();
298298function observerElements ( initWindow ) {
299299 initWindow . parent . CoCreate . observer . init ( {
300300 name : "ccAttribute" ,
301- observe : [ "attributes" ] , // "characterData"
301+ types : [ "attributes" ] , // "characterData"
302302 callback : ( mutation ) => {
303303 if ( mutation . attributeName != "attribute-unit" ) return ;
304304 let inputs = getInputFromElement (
@@ -635,27 +635,27 @@ init();
635635
636636observer . init ( {
637637 name : "ccAttribute" ,
638- observe : [ "childList " ] ,
638+ types : [ "addedNodes " ] ,
639639 selector : "[attribute]" ,
640640 callback : function ( mutation ) {
641- initElements ( mutation . addedNodes ) ;
641+ initElement ( mutation . target ) ;
642642 }
643643} ) ;
644644
645645observer . init ( {
646646 name : "ccAttribute" ,
647- observe : [ "attributes" ] ,
648- attributeName : [ "attribute-selector" ] ,
647+ types : [ "attributes" ] ,
648+ attributeFilter : [ "attribute-selector" ] ,
649649 callback : function ( mutation ) {
650650 initElement ( mutation . target ) ;
651651 }
652652} ) ;
653653
654654observer . init ( {
655655 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" ] ,
659659 callback : function ( mutation ) {
660660 updateElement ( { input : mutation . target , isColl : true } ) ;
661661 if ( mutation . attributeName != "attribute-unit" ) return ;
0 commit comments