Skip to content

Commit ea6ab8d

Browse files
committed
fix: update observer observe param to type and and attributeName to attributeFilter
1 parent 805bb62 commit ea6ab8d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const CoCreateApi = {
5555

5656
Observer.init({
5757
name: `${name}NodeObserver`,
58-
observe: ["addedNodes"],
58+
types: ["addedNodes"],
5959
selector: `[${name}]`,
6060
callback: function (mutation) {
6161
inputEvent(mutation.target);
@@ -69,8 +69,8 @@ const CoCreateApi = {
6969

7070
Observer.init({
7171
name: `${name}AttributeObserver`,
72-
observe: ["attributes"],
73-
attributeName: [name],
72+
types: ["attributes"],
73+
attributeFilter: [name],
7474
callback: function (mutation) {
7575
self.request({
7676
name,
@@ -261,7 +261,7 @@ const CoCreateApi = {
261261

262262
Observer.init({
263263
name: `apiNodeObserver`,
264-
observe: ["addedNodes"],
264+
types: ["addedNodes"],
265265
selector: "[module], [api]",
266266
callback: function (mutation) {
267267
let name =

0 commit comments

Comments
 (0)