@thi.ng/wasm-api-dom
Advanced tools
Comparing version 0.10.1 to 0.11.0
# Change Log | ||
- **Last updated**: 2022-11-24T12:23:48Z | ||
- **Last updated**: 2022-11-24T17:24:36Z | ||
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub) | ||
@@ -12,2 +12,13 @@ | ||
## [0.11.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api-dom@0.11.0) (2022-11-24) | ||
#### 🚀 Features | ||
- add check if auto-initializer is present ([40a32f5](https://github.com/thi-ng/umbrella/commit/40a32f5)) | ||
#### ⏱ Performance improvements | ||
- faster event target check/lookup ([8636215](https://github.com/thi-ng/umbrella/commit/8636215)) | ||
- only use linear search if target isn't configured element | ||
### [0.10.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api-dom@0.10.1) (2022-11-24) | ||
@@ -14,0 +25,0 @@ |
15
dom.js
@@ -46,3 +46,8 @@ import { adaptDPI } from "@thi.ng/adapt-dpi"; | ||
this.parent = parent; | ||
parent.exports._dom_init(); | ||
if (parent.exports._dom_init) { | ||
parent.exports._dom_init(); | ||
} | ||
else { | ||
parent.logger.warn("DOM module unused, skipping auto-init..."); | ||
} | ||
this.elements.add(document.head); | ||
@@ -178,5 +183,7 @@ this.elements.add(document.body); | ||
event.__bytes.fill(0); | ||
const target = e.target === window | ||
? -1 | ||
: this.elements.find((x) => x === e.target, false); | ||
const target = e.target === ctx | ||
? ctxID | ||
: e.target === window | ||
? -1 | ||
: this.elements.find((x) => x === e.target, false); | ||
event.target = target !== undefined ? target : -2; | ||
@@ -183,0 +190,0 @@ event.id = eventTypeID; |
{ | ||
"name": "@thi.ng/wasm-api-dom", | ||
"version": "0.10.1", | ||
"version": "0.11.0", | ||
"description": "Browser DOM bridge API for hybrid TypeScript & WASM (Zig) applications", | ||
@@ -99,3 +99,3 @@ "type": "module", | ||
}, | ||
"gitHead": "8d59e559a576ecb3d2c2d13edf5c3146df95d6ac\n" | ||
"gitHead": "75263a53b4601b62163253b11deabfd304bcc67d\n" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119695
2066