What the web platform is missing
This is my list of things I want browser vendors to build or fix. All of it came out of building this site. For each one I say what is missing, why I want it, and link to any specification issue, bug or proposal I found.
Where a gap can be tested, this page tests it in your browser. Each check shows a status badge and coloured bar: a red Gap badge means the gap is there, and a teal Works badge means your browser already does it.
The checks are running.
Why this matters to me
There are two ways to use someone else's code on my page. I can load their library into my origin, where it gets everything my page has: the document, storage, cookies and the network with my users' sign-in. Or I can put it in a frame on their origin, where it can touch nothing of mine. That is what I want, but for many jobs I can't pass it the data it needs because the type doesn't cross origins.
Video is my example. I'd like another origin to provide webcam filters and effects so I don't have to build them. I wouldn't trust a video library inside my origin, but I would trust it with frames: frames go in, frames come out. That needs a VideoFrame to cross origins, and it doesn't.
So the same-origin rule on these types doesn't keep third-party code away from the data. It pushes me to load that code into my own origin, or to copy the pixels a slower way. Some of these limits have good reasons, and where I know the reason I give it. I still think several of these types should be able to move between origins.
The AI router on this site works the same way: a site gets a port to my model account and never sees the key.
1. Rich data cannot cross origins
A MessagePort, an ArrayBuffer, a stream and an ImageBitmap can all be sent to a frame on another origin. The types below can't, and they are the ones a media or file service on another origin would need.
Video frames and audio data cannot be sent to another origin
A VideoFrame, an AudioData or an EncodedVideoChunk can be sent to a worker of the same page. Sent to a frame on another origin, it doesn't arrive. postMessage succeeds, the receiver gets an empty messageerror event, and the sender is told nothing.
Running: webcam effects from another origin, sent two ways
The frame below is an effects service on another origin. It has no camera and can't reach this page. This page sends it the same pictures as VideoFrame, which is what I want to use, and as ImageBitmap, which is what crosses origins today. Press Start. It uses a drawing unless you choose your camera.
The code is in effects-demo.js and effects.html.
A video frame is a handle to pixels that are often already on the graphics card, so moving it copies nothing. If it can't leave my origin, code that works on video has to come into my origin. With it I could have webcam effects, captions and noise removal from AudioData, video editor plug-ins and transcoders, all on another origin that never gets my camera, microphone or page.
Today you send an ImageBitmap, or copy the pixels into an ArrayBuffer. In the demo above the bitmap costs about a millisecond per small picture in the Chromium I built this with, so speed isn't the loss. You lose what a frame carries: the timestamp, duration, colour information and pixel format. You also have to convert camera and decoder frames to bitmaps and convert back for an encoder.
The video filter demo sends each VideoFrame to a sandboxed frame. That works when the sandboxed frame shares a process with the page. In Chrome 160 on a Mac the lab recorded that it didn't arrive.
- The lab sends 45 kinds of object to 13 places and records what happens. See the results.
- In the Chromium I built this with, the frame fails to arrive even when the other origin is on the same site and in the same process. So it is a rule about origins and not a limit of sending between processes.
- This web-platform-test passes only if a frame can neither be copied nor moved to another origin.
- The WebCodecs specification doesn't state the rule in its transfer steps. w3c/webcodecs #717 (2023) asked for it to be written down and asked if anyone had a use for sending these objects further. The latest comment, from October 2026, says the limit has now been added to the specification. This item is my answer to that question.
- The same failure is reported against Electron: electron #47705.
A camera or microphone track cannot be handed to anyone
The specification says a MediaStreamTrack can be transferred to a worker or to a frame in the same agent cluster, which in practice means the same site. It doesn't allow another origin at all. Chrome refuses to send one anywhere, including to a worker of the same page.
Running: a video track handed to a worker
This page makes a video track and tries to hand it to a worker, which is the simplest case the specification allows. Then it does what works today in Chromium: it cuts the track into frames itself and sends the worker a stream of them.
The only way to let a frame on another origin use my camera today is allow="camera", which lets that frame open the camera itself. I want to open the camera in my page and hand over one track. The specification already has the control I'd want: the page that made the track stays in charge of the source, and the track ends when that page goes away.
That would allow a video call widget with no camera permission, a recorder on another origin that I cut off by stopping my own track, and processing a live track in a worker in Chrome (Safari is reported to have shipped that in version 18).
- The lab: refused with
DataCloneErrorat every destination in Chromium 157 and Chrome 160. - The specification: Transferable MediaStreamTrack. The interface is marked
Transferable, SameAgentCluster.
File handles, data channels and media sources stop at the origin boundary
Each of these works inside one origin and fails to reach a frame on another.
| Type | Reaches another origin in your browser | What it would enable if it did |
|---|---|---|
FileSystemFileHandle | An editor on another origin that opens the one file I picked and saves it in place. It never sees the folder, and nothing is uploaded. | |
RTCDataChannel | A plug-in in a frame with no network access that can talk on one connection I opened, until I close it. | |
MediaSourceHandle | A player engine on another origin that feeds a video element in my page. | |
EncodedVideoChunk | A decoder or a transcoder as a service on another origin. | |
ReadableStream, for comparison | This one crosses, and it is what makes a transform on another origin possible. |
Select any answer to read the full result from your browser. The third column is to the right on a small screen.
Running: one file, opened by an editor on another origin
Two copies of an editor run in frames on another origin. One is sent the handle for a file in this page's private file system. The other is sent a copy of the text and has to ask this page to do the saving.
Running: one network connection, lent to a plug-in on another origin
This page opens a WebRTC connection. One plug-in is sent the data channel itself. The other is sent a port, and this page copies each message from the port onto the connection.
Each of these is a narrow grant: one file, one connection, one video element. That is how I'd give a third party a job without giving it my origin. For a file, the choices today are to send a copy that can't be saved back, or to load the editor's code into my own origin.
- The lab, in Chromium 157: none of the four reaches a frame on another origin, and all four work in a frame on the same origin.
- For file handles the rule is written down. The File System Standard says a handle that arrives in a different origin must fail with
DataCloneError.
Chrome ends a frame's process when the frame draws on a canvas it was sent
A canvas can give its drawing surface away with transferControlToOffscreen(). Sent to a worker, that works. Sent to a frame in another process (any frame on another site, and any sandboxed frame in current Chrome), the frame is killed just after its first draw, and every other frame of that site in the tab goes with it.
Running: a painter on another origin, drawing on this page
A frame on another origin paints a picture. First it sends finished pictures back for this page to draw. Then, when you press the second button, it is given the canvas itself.
A surface another origin can paint and can't read is a good way to embed a third party: charts, maps, a game or a document viewer drawn straight into a canvas that I lay out. Today the other origin has to send finished ImageBitmap frames for you to draw, which is what the canvas demos on this site now do.
- All three lab reports from Chrome 160 on a Mac record the receiver going silent for good after this one value.
- I reproduced it in Chromium 157 with site isolation turned on for the frame. With the frame in the page's own process, it draws.
- WebKit has a bug for the same case under its site isolation work: WebKit 325214. The Electron report above describes the frame crashing too.
2. Failures nobody is told about
The sender is not told that a message could not be read
When a value can't be rebuilt where it lands, postMessage has already returned. The receiver gets a messageerror event that doesn't say what failed or which message it was, and the sender gets nothing. It isn't consistent either: for some types and destinations the browser throws at the sender, and for others it fails silently at the receiver.
Every protocol on a port has to add acknowledgements and timeouts to find a failure the browser already knows about. Most of the failed cells in the lab's results are this kind, and the guide has one running. I didn't find an open issue for it. I'd like:
- An exception at the sender when the browser can tell at send time that the destination can't accept the type.
- The name of the type that failed on the
messageerrorevent. - An event on the sending port when a message it sent could not be delivered.
Nothing says that the other end of a port has gone
Close the tab, remove the frame or end the worker that holds the other end, and my port looks the same as before. No event fires and posting into it throws nothing.
So every library that makes calls over a port needs a heartbeat, which is slow to notice, wakes background tabs, and gets it wrong when a tab is only throttled. I'd like an event that the holder of a port opts in to, which fires when the other end calls close(), its document or worker is destroyed, or its process crashes. It doesn't need to fire for garbage collection.
The guide has five running ways to find out today. Across origins, ping on a timer on a second port kept for that. Inside one origin, have the other side hold a Web Lock for life and queue for the same lock.
- This was asked for in 2016: whatwg/html #1766.
- A
closeevent was added to the HTML Standard in January 2024 by pull request #9933, with an explainer by Fergal Daly. Chromium built it, and Chromium 157 still has it behind theMessagePortCloseEventflag. - whatwg/html #10201 then pointed out that the event tells one side when the other side's port was garbage collected, which a page should not be able to observe. The issue was closed on 2 October 2026 by removing the event from the Standard. It is not in the current text.
- Chrome's status page still says "Enabled by default". The check above shows what your browser does.
3. Ports as permissions
Holding a port is the permission to use it, which makes ports a good way to give someone a small, exact amount of access. These are the holes in that.
There is no port that works in one direction
Both ends of a MessageChannel can send and receive. You can't make an end that only sends or only receives, and anything can come back along a port, including another port.
A one-way link is the safe way to feed data to code I don't trust: if it can't send anything out, it doesn't matter what it reads. I had to build the one-way port on this site from two channels and code in the middle that copies messages forward and drops what comes back. It only works while the page running that code is alive, and it has to post each copy with no transfer list or a port could go forward and become a way to answer.
I'd like an option on MessageChannel that gives a send-only end and a receive-only end, enforced by the browser after the page that made it has gone. I didn't find a proposal for this. It would allow a sandboxed frame with no network that displays private data and can't send it anywhere, and a log that many parties can write to and none can read.
A readable stream can signal back to its writer
Handing someone only the readable side of a stream looks like a one-way link, but it isn't. A stream asks its source for the next chunk when the reader takes one, so the writer sees the timing of every read and a reader can send bits by choosing when to read.
I measured it: a sandboxed frame holding only a readable stream sent 16 bits to the writer by timing its reads, and all 16 were read correctly. It is running here. I'm not sure this can be fixed without losing back-pressure, which is the reason to use a stream. At the least the Streams Standard and MDN should say that a transferred readable is not a one-way link.
A port does not say who is at the other end
A message that arrives through window.postMessage carries the sender's origin. A message on a port carries none. A port can be passed on any number of times, and the receiver can't find out which origin holds the other end now.
Running: two senders that cannot be told apart
Two frames on two different origins are each given a port and each post one message. This page looks at what the two events say about who sent them.
Not knowing is right for many uses, because the port is the permission. But a service that hands out ports can't keep a record of who used one. I'd like an opt-in, set when the channel is made, that stamps each message with the origin of the context that posted it. That gives an audit log of which site used a delegated port (the AI router needs this for its usage counts) and a port that only works for the origin it was first given to. I didn't find an issue asking for this.
A stream stops when the context it passed through goes away
If A sends a stream to B and B sends it on to C, the data still travels through B. When B closes, C's reader stalls and gets no error.
Introducing two parties and then leaving works for a port, and it should work for a stream. Then a picker window could connect a producer to a consumer with a stream and close, which is what the hub does with ports. It runs in the streams section of the guide, and there has been an issue open since 2020: whatwg/streams #1063, "Transferable streams: the double transfer problem".
An AbortSignal cannot be sent
An AbortSignal is how modern APIs are cancelled, and it can't be posted to a worker or a frame.
Running: cancelling a job in a worker
Two workers each start a long job. One is sent an AbortSignal with the request, the way fetch takes one. The other is sent a port to listen on.
I want to cancel work on another thread or origin with the same signal I'd pass to fetch. Today each library builds its own, as Hawser does with a port. The lab shows it refused everywhere, and there is an open issue from 2021: whatwg/dom #948.
4. Lifetime and reach
A service worker loses its ports when it is stopped
The browser stops a service worker when it is idle, and every port it held goes with it.
Mounting another site at a path and a tab that serves other tabs both need a service worker to hold a port, so both make the worker ask the open pages for a new port each time it wakes. I'd like the ports to survive a stop, and a message arriving on one to start the worker, the way a message from a page does. Then a service worker could be a dependable router between a site's pages and the other origins they have been introduced to.
There is nowhere for two sites to meet
Two sites can pass a port only if one holds a reference to a window of the other: one it opened, its opener, or a frame. A hidden frame from a third origin used to work as a meeting point. Now its storage and its SharedWorker are separate for each top-level site, so it can't be one. That is why the hub on this site is a visible popup with its registry on a server.
The partitioning is there to stop tracking and I'm not asking for it to be undone. I'm asking for a way through it that the person using the browser controls, which is why I worked on Web Intents. I'd like a picker drawn by the browser, like the one FedCM has for sign-in, that lets the person choose a site for a job and hands each side one end of a MessageChannel.
That gives "edit this image with", "pay with" and "send to" with the person's own choice of site and no server, and a site calling the person's own AI model or agent. The Storage Access API can already give a frame an unpartitioned shared worker after a prompt, but that helps one site reach itself on other sites. It doesn't introduce two sites to each other.
A page with shared memory cannot talk to a popup on another origin
To get a SharedArrayBuffer a page has to be cross-origin isolated. The headers that do that also cut it off from any window on another origin that it opens, so it can't hand that window a port. The isolated room shows what changes.
Chrome has had an answer on desktop since version 137: Document-Isolation-Policy, which isolates one document and leaves its popups reachable. I want it in Chrome on Android, Safari and Firefox.
5. Things that should be sendable and are not
I tried to send every kind of object I could think of (the full table is below). These are the ones where I think the answer should change.
The writer for one file cannot be moved
createWritable() on a file handle gives a WritableStream for that one file. Every other WritableStream can be transferred, to another origin too. This one can't.
It is the smallest grant over a file there could be: write to this one file until I close it. It gives away no handle, no folder and no permission to read. A converter or exporter on another origin could write its result straight into a file I chose, and a worker could write a large file while the page stays responsive. There is an open issue from 2023: whatwg/fs #119.
A Request, a Response and their Headers cannot be copied
The objects that describe an HTTP exchange can't be posted anywhere. A body stream can be moved, but the object around it can't.
Mounting another site at a path and a tab that serves other tabs both take each request apart into a method, an address, a list of headers and a body stream, post the parts, and build a Response again on the way back. If these could be sent, a service worker could hand a request to a tab, a worker or another origin in one line with no custom wire format. There is an open issue from 2022: whatwg/fetch #1399.
Streams the browser makes are not all transferable
A TransformStream I make can be moved. A CompressionStream or a TextDecoderStream, which have the same two ends, can't be moved as one object. A WebSocket can't be moved at all.
You'd expect anything that is a stream to be transferable, and you find the exceptions by trial. For a socket, the answer today is WebSocketStream, which only Chromium has, or a port with a copy loop behind it as in the shared socket.
A canvas cannot be moved once it has been drawn on
An OffscreenCanvas can be transferred only until someone asks it for a drawing context. After that it is fixed to its thread. So I can't hand a half-made picture from one worker to the next, or take a canvas back from a worker that is shutting down, without copying it out as a bitmap.
It has been asked for and closed: whatwg/html #6615.
Decoded audio cannot be sent as it is
An AudioBuffer is what decodeAudioData returns, and it can't be posted. You have to copy its samples out one channel at a time and build the buffer again on the other side.
It was asked for and closed in 2023: WebAudio/web-audio-api #2390.
Nothing from WebGPU can be sent
A graphics device, a buffer or a texture belongs to the thread that made it. Two workers can't share a device, and a texture can't be handed from the worker that made it to the worker that draws it.
Video effects and machine learning could keep their data on the graphics card between stages that run in different workers or come from different origins. The check only runs where the browser has a graphics adapter. The WebGPU group has had an issue open since 2019: gpuweb #354.
A key can be copied and cannot be moved
A CryptoKey that nobody can read can still be posted, and it is always a copy. The sender keeps its key, and the receiver can store its copy and use it for ever. You can't move a key so that only one holder exists, and you can't give a key that can't be stored.
It is running between two real sites: the receiving site stores the key and goes on signing after the sender has destroyed its own. I'd like to hand a signing key from an old device or tab to a new one and know the old one no longer has it. Today you keep the key and send a port that uses it, which needs the page holding the key to stay open.
My own objects lose their class on the way
An instance of a class arrives as a plain object with no methods. An error arrives without any field the standard doesn't list. A class can't say how it should be copied or moved.
Hawser on this site has to pack and rebuild errors itself. I'd like a library type (a money amount, a date range, a handle that wraps a port) to cross a port as itself, and a type of my own that can be moved so the sender's copy stops working, the way a buffer's does. There is an open issue from 2021: whatwg/html #7428.
6. Primitives that are not there
These are things that messaging between processes has on other platforms and the web doesn't.
A worker cannot be started from another origin's script
new Worker() takes only a script from my own origin. To run another origin's code off my thread and outside my origin, I have to add a hidden frame on that origin and have the frame start the worker.
This is the cheapest version of the design at the top of this page. A worker that runs as the other origin has no document, no access to my page and none of my storage, and I'd give it a port and nothing else. A third-party library (analytics, a search index, a spell checker, a codec) could ship as a worker address.
I'd like a worker that runs with the origin of its script when that script's server opts in, with partitioned storage like a frame's. I didn't find a proposal for it. The specification and browsers don't agree on the detail of what happens now: whatwg/html #12046.
A worker cannot be started with less than my page has
A frame can be sandboxed: no origin, no storage and, with a content security policy, no network. A worker can't. It always gets the origin, storage and network access of the page that started it.
Every demo on this site that says "this code has no network access" runs in a sandboxed frame because there is no other way. In current Chrome each of those frames costs a process, and it is the kind of frame that video frames do not reach.
I'd like options on new Worker() for an opaque origin (a unique throwaway origin that matches nothing else, not even your own site) and no network, so I can run code I didn't write (a spreadsheet formula, a plug-in, code written by an AI model) on data I must not leak. ShadowRealm, at stage 2.7 in TC39, is related. It runs on the same thread and takes only plain values across its boundary.
A port does not say how much is waiting in it
postMessage always returns at once. If the receiver is slow, messages pile up in memory and the sender can't see it. A WebSocket has bufferedAmount, and a stream has desiredSize and ready. A port has nothing.
I'd like a count on the port of messages or bytes not yet delivered, and an event when it falls to zero. Then I could send frames, samples or log lines at the rate the other side can take them. The port that crosses devices has its own credit scheme for streams and nothing for plain messages. I didn't find an issue asking for this.
A transferred stream copies every chunk
A stream gives you back-pressure between contexts, but what is written into a transferred stream is copied to the other side, never moved. You can't pass a transfer list with a chunk.
So I have to choose. A port moves large data for free and has no back-pressure. A stream has back-pressure and copies everything. Video needs both: the webcam effects design should be two streams with each frame moved, at the rate the slower side sets. The nearest issue I found is whatwg/streams #1187, open since 2021.
A worker cannot stop and wait for an answer
The only way for a worker to block until another context answers is Atomics.wait on a SharedArrayBuffer, which needs the whole page to be cross-origin isolated. You can't wait on a port. Node.js can: receiveMessageOnPort().
Code that was written to be synchronous (a compiled C program, a Python interpreter, a database engine) could call out to a page, a file or a person without being rewritten. The blocking call demo on this site runs only in the isolated room. I didn't find an issue asking for this on the web.
Code cannot be sent
A function can't be posted. To run a piece of my code in a worker I have to put it in a separate file, or turn it into text and a blob address, which a strict content security policy forbids. Many of the demos on this site build their workers from text for this reason.
TC39 has a proposal: module expressions, a block of code that can be posted and imported on the other side. Its part about starting a worker from one is on hold.
Objects are always copied whole
Bytes can be moved or shared. A JavaScript object can't: a large tree of objects is copied in full each time it is posted, on the sender's thread. I'd like a document model, a scene or a parsed file that the page and its workers all read with no copy on every change.
TC39 has a proposal at stage 2 for objects of fixed shape that can be shared between threads without copying: JavaScript structs.
What cannot be built today
The same list as things I want to build, what stops each one, and the nearest thing that works.
| I want to | What stops it | The nearest thing today |
|---|---|---|
| Use webcam effects from another origin | Video frames stop at the origin | Send bitmaps, and lose what a frame carries |
| Get live captions from a service with no microphone access | Audio data stops at the origin | Copy samples into buffers |
| Give a call widget one camera track | Tracks cannot be sent | Give the widget the camera permission |
| Let an editor on another origin edit one file | File handles and file writers cannot be sent | Send the text, take text back, and save it myself |
| Lend a plug-in one network connection | Data channels and sockets cannot be sent | A port, with my page copying every message |
| Let another origin draw a chart in my page | Chrome ends the frame | Take bitmaps and draw them myself |
| Feed private data to code that cannot leak it | No one-way port, streams signal back, no worker without network | A sandboxed frame, two channels, and a page in the middle |
| Run a third-party library off my thread and outside my origin | No worker from another origin | A hidden frame that starts the worker |
| Make a call over a port that fails when the other side dies | No close event | A heartbeat |
| Cancel a job in another context | An AbortSignal cannot be sent | A message I define |
| Stream video between contexts with back-pressure and no copies | Ports have no back-pressure, streams copy | A port, with my own count of what is in flight |
| Serve part of my site from a tab or another origin | Requests and responses cannot be sent, service workers lose ports | Take each request apart and ask for a new port on every wake |
| Let the person pick a site for a job, with no server | Nowhere for two sites to meet | A popup window and a registry on a server |
| Keep a record of which site used a port | A port does not say who is at the other end | One port for each party, and trust that it is not passed on |
| Move a signing key to a new device and know the old one is gone | Keys are only copied | Keep the key and send a port |
| Run synchronous code that calls the page | A worker cannot wait on a port, isolation cuts off popups | Cross-origin isolate the page |
Every kind of object I tried
For each one: can it be copied, can it be moved, and does it reach a frame on another origin. The answers come from your browser. The lab tests fewer kinds in thirteen places, and checks that each one still works where it lands.
| Kind | Copied | Moved | To another origin |
|---|
What I am not asking for
- Shared memory between origins. A
SharedArrayBufferand a compiledWebAssembly.Modulestay inside one origin for reasons I accept. - Ports that can be saved to storage. Leaving a port with a shared worker over a reload is enough.
- Any of the cross-origin transfers above without both sides choosing it. The sender has to post the value and the receiver has to be listening.
How this list was made
Every item comes from something I built on this site that didn't work or needed a workaround. The baseline measurements are from the lab in Chromium and Chrome. See the live lab results for what other browsers have reported, or run the lab in yours to add to them.
If something here is wrong, already fixed, or already proposed somewhere I didn't find, please open an issue. There is more background in Further reading, under how the standards changed and the specifications.