@mulsense/xnew 0.1.4 → 0.1.5
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/dist/xnew.js +4 -2
- package/dist/xnew.mjs +4 -2
- package/package.json +1 -1
package/dist/xnew.js
CHANGED
|
@@ -502,7 +502,7 @@
|
|
|
502
502
|
this._.systems[type].push(listener);
|
|
503
503
|
}
|
|
504
504
|
if (this._.listeners1.has(type, listener) === false) {
|
|
505
|
-
const execute = Unit.wrap(
|
|
505
|
+
const execute = Unit.wrap(Unit.current, listener);
|
|
506
506
|
this._.listeners1.set(type, listener, [this.element, execute]);
|
|
507
507
|
Unit.typeUnits.add(type, this);
|
|
508
508
|
if (/^[A-Za-z]/.test(type)) {
|
|
@@ -577,9 +577,11 @@
|
|
|
577
577
|
// event
|
|
578
578
|
//----------------------------------------------------------------------------------------------------
|
|
579
579
|
Unit.typeUnits = new MapSet();
|
|
580
|
-
Unit.reset();
|
|
581
580
|
|
|
582
581
|
const xnew$1 = function (...args) {
|
|
582
|
+
if (Unit.root === null) {
|
|
583
|
+
Unit.reset();
|
|
584
|
+
}
|
|
583
585
|
let target;
|
|
584
586
|
if (args[0] instanceof HTMLElement || args[0] instanceof SVGElement) {
|
|
585
587
|
target = args.shift(); // an existing html element
|
package/dist/xnew.mjs
CHANGED
|
@@ -496,7 +496,7 @@ class Unit {
|
|
|
496
496
|
this._.systems[type].push(listener);
|
|
497
497
|
}
|
|
498
498
|
if (this._.listeners1.has(type, listener) === false) {
|
|
499
|
-
const execute = Unit.wrap(
|
|
499
|
+
const execute = Unit.wrap(Unit.current, listener);
|
|
500
500
|
this._.listeners1.set(type, listener, [this.element, execute]);
|
|
501
501
|
Unit.typeUnits.add(type, this);
|
|
502
502
|
if (/^[A-Za-z]/.test(type)) {
|
|
@@ -571,9 +571,11 @@ Unit.componentUnits = new MapSet();
|
|
|
571
571
|
// event
|
|
572
572
|
//----------------------------------------------------------------------------------------------------
|
|
573
573
|
Unit.typeUnits = new MapSet();
|
|
574
|
-
Unit.reset();
|
|
575
574
|
|
|
576
575
|
const xnew$1 = function (...args) {
|
|
576
|
+
if (Unit.root === null) {
|
|
577
|
+
Unit.reset();
|
|
578
|
+
}
|
|
577
579
|
let target;
|
|
578
580
|
if (args[0] instanceof HTMLElement || args[0] instanceof SVGElement) {
|
|
579
581
|
target = args.shift(); // an existing html element
|