Scanner
The scanner is the part of Friday that reads the page. It runs in the visitor's browser, builds a structured snapshot of what's visible, and sends that snapshot to the server alongside the visitor's message. The server uses it to decide what to answer and what to do.
What it captures
- Visible elements. Headings, paragraphs, links, buttons, form fields, and a short text excerpt of the visible viewport. Off-screen content is included only if it's structurally important (navigation, footer links).
- An action manifest. For each interactive element, a stable identifier and a short label — what the scanner thinks the element does. ("Add to cart", "Open menu", "Sign in".) This is the menu of actions Friday can choose from.
- Page metadata. URL, title, language, and the Open Graph description (if present).
What it does not capture
- Form fields marked password, credit-card, or otherwise sensitive (
autocomplete="cc-number", etc). - Anything inside an element with
[data-friday-deny]. - Hidden inputs, off-screen content with
aria-hidden="true", or elements withdisplay: none. - Canvas pixels (Friday can't OCR a canvas) and video frame contents.
Two escape hatches
data-friday-deny — hide something completely
Put it on any element you don't want Friday to see or touch. The whole subtree is skipped during scan and refused by the actions runtime.
<div data-friday-deny> <!-- pricing experiment, internal notes, anything sensitive --> </div>
data-friday-id — pin a stable selector
The scanner generates selectors automatically, but they can break when your CSS classes change. Add data-friday-id to important interactive elements and Friday will use that as the selector instead.
<button data-friday-id="book-demo">Book a demo</button>
Shadow DOM and iframes
- Open shadow roots: Friday traverses them. Most modern component libraries (lit, stencil, default Web Components) use open shadow roots and work fine.
- Closed shadow roots: not reachable. Friday will skip the subtree.
- Same-origin iframes: Friday tries to scan them. The widget script needs to be loaded in both the parent and the iframe — Sitepilot does this automatically for WordPress.
- Cross-origin iframes: blocked by the browser. Friday can't scan or click into them.
Known limits
<canvas> (Figma-style apps, some maps, some games), the scanner sees one big rectangle. Friday can't click specific things inside it.Performance
A scan runs in 30–80ms on a typical content page, and only when the visitor sends a message — not on every page load. The result is capped at ~4KB of text plus the manifest, so payloads stay small.