mount-observer 0.0.77 → 0.0.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/MountObserver.js CHANGED
@@ -465,7 +465,7 @@ export class MountObserver extends EventTarget {
465
465
  //TODO: check for outside
466
466
  }
467
467
  if (outside !== undefined) {
468
- if (!this.#outsideCheck(target, x, outside))
468
+ if (!this.#outsideCheck(this.objNde.deref(), x, outside))
469
469
  return false;
470
470
  }
471
471
  if (whereSatisfies !== undefined) {
@@ -484,6 +484,8 @@ export class MountObserver extends EventTarget {
484
484
  }
485
485
  }
486
486
  await bindishIt(els, target, { assigner });
487
+ if (elsToMount.length === 0)
488
+ return;
487
489
  this.#mount(elsToMount, initializing);
488
490
  }
489
491
  async #inspectWithin(within, initializing) {
package/MountObserver.ts CHANGED
@@ -497,7 +497,7 @@ export class MountObserver extends EventTarget implements IMountObserver{
497
497
  //TODO: check for outside
498
498
  }
499
499
  if(outside !== undefined){
500
- if(!this.#outsideCheck(target as Element, x, outside)) return false;
500
+ if(!this.#outsideCheck(this.objNde!.deref() as Element, x, outside)) return false;
501
501
  }
502
502
  if(whereSatisfies !== undefined){
503
503
  if(!whereSatisfies(x, this, {stage: 'Inspecting', initializing})) return false;
@@ -514,6 +514,7 @@ export class MountObserver extends EventTarget implements IMountObserver{
514
514
 
515
515
  }
516
516
  await bindishIt(els, target, {assigner});
517
+ if(elsToMount.length === 0) return;
517
518
  this.#mount(elsToMount, initializing);
518
519
  }
519
520
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mount-observer",
3
- "version": "0.0.77",
3
+ "version": "0.0.78",
4
4
  "description": "Observe and act on css matches.",
5
5
  "main": "MountObserver.js",
6
6
  "module": "MountObserver.js",
@@ -87,7 +87,7 @@
87
87
  ],
88
88
  "types": "./ts-refs/mount-observer/types.d.ts",
89
89
  "scripts": {
90
- "serve": "python3 ./node_modules/ssi-server/ssi_server.py",
90
+ "serve": "python ./node_modules/ssi-server/ssi_server.py",
91
91
  "test": "playwright test",
92
92
  "safari": "npx playwright wk http://localhost:8000",
93
93
  "update": "ncu -u && npm install"