Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /streams/readable-byte-streams/crashtests/from-cross-realm-error.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<script>
const foreign = window.open("about:blank");
const stream = new foreign.ReadableStream({
type: "bytes",
pull(controller) {
ReadableByteStreamController.prototype.error.call(controller, new Error("cross-compartment"));
}
});
new Response(stream).text().catch(() => {});
</script>