Skip to content

Commit

Permalink
fix: observer taget has been renamed to selector
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Oct 31, 2024
1 parent 017dd71 commit adbd2c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ Actions.init({
Observer.init({
name: 'render',
observe: ['addedNodes'],
target: elementSelector,
selector: elementSelector,
callback: function (mutation) {
init(mutation.target)
}
Expand All @@ -907,7 +907,7 @@ Observer.init({
Observer.init({
name: 'render',
observe: ['addedNodes'],
target: '[render]',
selector: '[render]',
callback: function (mutation) {
if (mutation.target.hasAttribute('render-clone'))
return
Expand All @@ -929,7 +929,7 @@ Observer.init({
// Observer.init({
// name: 'render',
// observe: ['addedNodes'],
// target: '[render-clone]',
// selector: '[render-clone]',
// callback: function (mutation) {
// let renderedNode = renderedNodes.get(mutation.target)
// if (!renderedNode) return
Expand Down Expand Up @@ -962,7 +962,7 @@ Observer.init({
Observer.init({
name: 'renderNodesRemoved',
observe: ['removedNodes'],
target: '[render-clone]',
selector: '[render-clone]',
callback: function (mutation) {
if (mutation.target.parentElement) return
let renderedNode = renderedNodes.get(mutation.target)
Expand Down

0 comments on commit adbd2c9

Please sign in to comment.