@miaskiewicz/turbo-dom 0.1.37 → 0.1.38
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miaskiewicz/turbo-dom",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.38",
|
|
4
4
|
"description": "Faster, more spec-correct DOM for test runners — native html5ever (Rust/WASM) parser + lazy copy-on-write DOM. A drop-in-style alternative to jsdom/happy-dom for vitest & jest.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
package/src/runtime/events.mjs
CHANGED
|
@@ -25,7 +25,7 @@ export class Event {
|
|
|
25
25
|
this.timeStamp = 0;
|
|
26
26
|
this._stopPropagation = false;
|
|
27
27
|
this._stopImmediate = false;
|
|
28
|
-
this._path = []
|
|
28
|
+
this._path = null; // set by dispatchEvent; composedPath() reads [] until then
|
|
29
29
|
this._passiveListener = false;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -40,7 +40,7 @@ export class Event {
|
|
|
40
40
|
get returnValue() { return !this.defaultPrevented; }
|
|
41
41
|
set returnValue(v) { if (v === false) this.preventDefault(); }
|
|
42
42
|
|
|
43
|
-
composedPath() { return this._path.slice(); }
|
|
43
|
+
composedPath() { return this._path ? this._path.slice() : []; }
|
|
44
44
|
|
|
45
45
|
// legacy init — react-dom's dev rethrow path uses createEvent('Event')+initEvent
|
|
46
46
|
initEvent(type, bubbles = false, cancelable = false) {
|
|
Binary file
|