You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,13 @@
12
12
(`AbortController`, `AbortSignal` with the `abort`/`timeout`/`any` statics)
13
13
layered on the runtime's `EventTarget`, the GC contract (weak timers and
14
14
`any()` links, listener-driven persistence), and the `DOMException`
15
-
stand-in (name-patched `Error`reasons).
15
+
reasons.
16
16
-[TextEncoder / TextDecoder and atob / btoa](text-encoding.md) — the WHATWG
17
17
encoding and base64 globals (`TextEncoder`, `TextDecoder`, `atob`, `btoa`),
18
18
the supported encodings with their label sets, streaming decode semantics,
19
19
and the lazy-global tier that runs their builtins only on first use.
20
20
-[Error handling](error-handling.md) — global `error`/`unhandledrejection` events, `reportError`, catching Java exceptions in JS (`error.nativeException`), forwarding JS throws to Java callers (`interop.escapeException`), JS stacks on Java exceptions (`com.tns.JavaScriptStackTrace`), configuration flags, and crash-reporter integration.
21
-
-[structuredClone](structured-clone.md) — the WHATWG `structuredClone(value, { transfer })` global: what clones, how graph identity and cycles are preserved, `ArrayBuffer` transfer, and the `DataCloneError`-named `Error` that stands in for `DOMException`.
21
+
-[structuredClone](structured-clone.md) — the WHATWG `structuredClone(value, { transfer })` global: what clones, how graph identity and cycles are preserved, `ArrayBuffer` transfer, and the `DataCloneError``DOMException` on failure.
Copy file name to clipboardExpand all lines: docs/structured-clone.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ Two differences are intentional:
48
48
49
49
## Deviations from the specification
50
50
51
-
-**`DataCloneError` is an `Error`, not a `DOMException`.**This runtime has no `DOMException`, so failures throw an `Error` whose `name` is set to `"DataCloneError"`. Detect failures with`e.name === "DataCloneError"`; `instanceof DOMException`cannot work.
51
+
-**`DataCloneError` is a `DOMException`.**Failures throw a `DOMException` named `"DataCloneError"`, from the JS argument checks and the native serializer alike, so both`e.name === "DataCloneError"` and `instanceof DOMException`detect them. (The serializer falls back to a `DataCloneError`-named `Error` only when the builtin can no longer run, e.g. during isolate teardown.)
52
52
-**Only `ArrayBuffer` is transferable.** The spec's other transferable types — `MessagePort`, `ImageBitmap`, `ReadableStream` and friends — do not exist here. A non-`ArrayBuffer` in the transfer list is a `DataCloneError`.
53
53
-**Host objects are not cloneable by `structuredClone`.** The spec leaves platform objects to each host; here every native/interop wrapper is rejected with a `DataCloneError`, because a JavaScript copy detached from its native counterpart would be a wrapper around nothing. Worker `postMessage` deliberately differs — see above.
0 commit comments