Support widget
Share one part of a page with a support agent, or with an AI model, instead of your whole screen. Open the widget, click the panel you need help with, and only that element is sent. Private fields are blacked out, and there's no screen-sharing prompt.
Your usage
412 kWh
so far in November, 18% more than October
Payment method
Your last payment of £86.20 was declined on 14 November.
Preferences
Meter reading due by 28 November.
Show the code sharing one panel, not the screen
- The app is ordinary markup.
data-shareablemarks what may be picked,data-privatemarks fields that must never leave. - Turn the picked element into a surface with one call.
elis the panel the user clicked. Input from the other side is refused unless the user ticked the box. - Show the user exactly what leaves the page.
surface.mirroris the redacted copy, an ordinary canvas. - For a model: a JPEG of the copy and a list of its elements.
- For a person: share the surface in a room and give them the link.
- The agent's page.
- Inside
attachSurface(): the element gets a shadow root with a drawable canvas and a slot, so its children are drawn without being moved. - Inside: the shareable copy, with private fields blacked out.
- Inside: replaying approved input on the real elements.
- The whole library.
How it works
- Pick. Clicking a panel gives that element a shadow root containing a canvas and a slot. Its children stay where they are in the document and are painted through the canvas, which is what makes their pixels available. The panel isn't cloned.
- Redact. Each frame is copied to a second canvas, where anything marked
data-private(and every password field) is covered. Only that copy leaves the page. The same rule withholds their values from the element list. - Send pixels and a list of controls. A person gets video over WebRTC. A model gets a JPEG. Both also get a list of the region's controls, read from the DOM: role, name, value. With that list either of them can say "the Retry payment button" and the page knows which element is meant.
- Act with permission. The agent's pointer is drawn on the canvas for you to see. Clicks and typing from the agent are refused until you allow them. The model can only propose a click or a value; you press the button that makes it happen.
Live checks
| Result | Experiment | Detail |
|---|
Findings
- Element sharing is a different permission model from screen sharing. The page chooses what can be shared, the user chooses which part, and nothing else is in the frame. Other tabs, notifications and the address bar can't be.
- The page can redact, because it knows its own DOM. A screen recorder sees pixels. This sees elements, so "never send the card number" is a selector.
- A model does better with the DOM beside the picture. The picture shows layout and state; the element list gives exact labels and values and gives the model something to point at and act on.
- Any element with a shadow root to spare can be converted in place. Grid and flex containers need their layout properties copied to the inner box. Elements that already have a shadow root, or can't have one, need a wrapper instead.
- The sharing tab must stay visible. It is the page's own paint that is being sent, so a hidden tab sends nothing.