HTML standardized one-way A -> B navigation via <a>, leaving inline StretchText transclusion, shareable reader trails, and capability-isolated multi-origin widgets unstandardized.
Confirm: fetch live HTTPS pages via the SSRF guard, serialize #trail= + #:~:text= links, and isolate Mode 4 without leaking host globals. Falsify: upstream X-Frame-Options, CSP frame-ancestors, or client-only JS hydration block extraction.
Fetch a live URL (or click Test SSRF: 127.0.0.1), slide Depth (0–3) to expand StretchText, click SVG regions to build a #trail= hash, then open 2. <web-island> 4-Mode Bench.
How This Works & 3 Things To Try
Pull any public https:// page through the SSRF-shielded Cloudflare Worker (/api/fetch-doc), adjust inline StretchText depth, merge two documents with citation fragments, and save a trail into the URL hash.
- Fetch a live URL & test SSRF guards: Click Fetch Live URL into Card B or use a quick preset (including
http://127.0.0.1/) to inspect extracted sections, upstream framing headers, and JS-hydration diagnostics. - StretchText & Text Fragments: Drag the Depth (0–3) slider (uses CSS View Transitions when supported) and inspect live
#:~:text=links. - Build a Memex
#trail=URL: Click any quadrant on the spatial SVG diagram or + Add to #trail= to update the shareable base64url URL fragment live in the address bar.
Four Link Directions Beyond <a>
Live Document Loader
A <- B StretchText Expansion
B -> A Backlinks & A -> B Outbound
Outbound Links (Click to Transclude B)
A ⊕ B Context Merger
B <- A Memex #trail= & Rich Anchors
Click any diagram quadrant below to append a spatial anchor to your trail:
How <web-island> Differs From Alternatives
Every box below renders the same interactive seat-picker capability using four web architectures. Compare isolation, visual theming, tool invocation, and cryptographic origin signing side by side.
- Inspect the Mode 3 DOM/storage leak: Look at Mode 3: Raw Same-Origin Custom Element—without an iframe boundary, the third-party script reads this page's
data-host-emailandlocalStoragedirectly. - Switch Host Design Tokens dynamically: Change Host Design Tokens to Editorial Paper or Terminal Amber—Mode 4 updates over
MessageChannelusing allowlisted tokens while staying opaque. - Verify ECDSA P-256 Receipt & Tamper Check: Click WebMCP: select_seat("B1") then WebMCP: checkout_with_passkey_demo(), then click Tamper 1 Byte & Re-Verify to verify that
crypto.subtle.verify()returnsfalse.
Four Composition Trust Boundaries
Mode 1: Classic Opaque Frame
Origin isolated, hardcoded height, ignores host tokens.
Mode 2: Scraped / Synthesized HTML
Adopts host styles locally but lacks origin key custody.
Mode 3: Raw Same-Origin Custom Element
Shares host DOM & storage without a sandbox barrier.
Mode 4: Proposed <web-island> Frame
sandbox="allow-scripts" + MessageChannel tokens, sizing, and ECDSA receipts.
Link-Graph vs. Transclusion & Crawl-Gate Simulation
Calculates steady-state PageRank authority (25 iterations, base damping 0.85) and publisher referral click-through retention as inline transclusion, login/paywall gating, and direct answer absorption increase.
| Publisher Node | Access | Open Score | Referral Retained | Delta |
|---|
What You Actually Write With This Pattern
Extending unidirectional links with client-encoded fragment trails, StretchText expansion, SSRF-validated edge extraction, and sandboxed <web-island> embeds communicating over typed MessageChannel ports.
<!-- 1. Flat link discards context; no span pointer or trail -->
<a href="https://example.com/essay">Read essay</a>
<!-- 2. Unisolated third-party script shares host DOM & storage -->
<script src="https://third-party.example/widget.js"></script>
<raw-seat-widget></raw-seat-widget>
<!-- Script reads localStorage.getItem("hypermedia_host_token") -->
<!-- Four-direction fragment pointers + isolated <web-island> iframe -->
<a href="https://aifoc.us/hypermedia/#:~:text=StretchText%20and%20transclusion">
Cited span
</a>
<iframe id="web-island-frame" sandbox="allow-scripts"
src="/islands/seat-picker?mode=web-island"></iframe>
<script type="module">
import { stretchTextLevels, encodeTrail } from "/lib/hypermedia-core.js";
const view = stretchTextLevels(section, 2);
location.hash = encodeTrail([{ title: section.heading, url: view.fragmentUrl, note }]);
</script>
Complete Page Setup: Real Definition, HTML Markup & Wiring
End-to-end wiring from public/index.html, public/lib/hypermedia-core.js, public/app.js, src/ssrf.ts, and src/worker.ts: the page renders StretchText depth controls, serializes #trail= fragments, compares all four embedding isolation modes, and proxies external HTTPS reads through SSRF validation on /api/fetch-doc.
<!-- 1. Page HTML Setup (public/index.html: StretchText + 4 Isolation Modes) -->
<input type="range" id="stretch-depth" min="0" max="3" value="2">
<div id="stretch-container"></div>
<iframe class="island-frame" sandbox="allow-scripts" src="/islands/seat-picker?mode=classic"></iframe> <!-- Mode 1 -->
<div id="mode2-status">No remote session key custody inside scraped host DOM.</div> <!-- Mode 2 -->
<div id="mode3-mount"></div> <!-- Mode 3 (<raw-seat-widget>) -->
<iframe id="web-island-frame" class="island-frame" sandbox="allow-scripts" src="/islands/seat-picker?mode=web-island"></iframe> <!-- Mode 4 -->
<script type="module" src="/app.js"></script>
// 2. Concrete Trail, Island Manifest, Theme Tokens & SSRF Policy (hypermedia-core.js, app.js, ssrf.ts)
const THEMES = {
editorial: { "--island-bg": "#f8fafc", "--island-fg": "#0f172a", "--island-accent": "#1d4ed8", "--island-radius": "6px" },
slate: { "--island-bg": "#161d2f", "--island-fg": "#e2e8f0", "--island-accent": "#38bdf8", "--island-radius": "8px" },
amber: { "--island-bg": "#1c1917", "--island-fg": "#fef3c7", "--island-accent": "#f59e0b", "--island-radius": "10px" },
};
// GET /.well-known/web-island.json -> schema: "https://aifoc.us/schemas/web-island-v0", sandbox: "allow-scripts",
// channelProtocol: "web-island-messagechannel-v1", tools: ["list_seats", "select_seat", "checkout_with_passkey_demo"]
// Island CSP (src/worker.ts): script-src <origin>; style-src <origin>; connect-src <origin> (zero inline scripts)
const BLOCKED_HOSTNAMES = new Set(["localhost", "ip6-localhost", "ip6-loopback", "metadata.google.internal", "metadata"]);
// 3. Page Bootstrap, SSRF-Checked /api/fetch-doc & MessageChannel Wiring
const res = await fetch(`/api/fetch-doc?url=${encodeURIComponent(rawUrl)}`);
// src/worker.ts + src/ssrf.ts: validatePublicHttpsUrl() enforces https://, port 443, no private CIDRs,
// follows up to 4 redirect: "manual" hops, caps body at 524288 bytes, reports X-Frame-Options & JS-hydration diagnostics
const expanded = stretchTextLevels(section, hyperState.stretchDepth);
history.replaceState(null, "", encodeTrail(hyperState.trail));
const channel = new MessageChannel();
channel.port1.onmessage = async (event) => {
if (event.data?.type === "CHECKOUT_RECEIPT") {
await verifyReceiptSignature(event.data.signed.canonicalPayload, event.data.signed.signatureB64u, event.data.signed.publicKeyJwk);
}
};
frame.contentWindow?.postMessage({ type: "ISLAND_INIT", tokens: sanitizeDesignTokens(THEMES[theme]) }, "*", [channel.port2]);
Core Plumbing Required Today (Browser + Edge / Protocol Contract)
// src/worker.ts + src/ssrf.ts — SSRF-shielded fetch with manual redirect checks & 512 KiB cap
let check = validatePublicHttpsUrl(targetRaw); // blocks 127.0.0.0/8, 10/8, 169.254/16, non-443
const res = await fetch(currentUrl, { redirect: "manual" }); // re-validates every 3xx Location
// public/app.js + public/lib/hypermedia-core.js — MessageChannel + ECDSA P-256 verification
const channel = new MessageChannel();
frame.contentWindow?.postMessage(
{ type: "ISLAND_INIT", tokens: sanitizeDesignTokens(theme) }, "*", [channel.port2]
);
const valid = await verifyReceiptSignature(
signed.canonicalPayload, signed.signatureB64u, signed.publicKeyJwk
);
Unisolated third-party <script> widgets sharing host storage, brittle ad-hoc scraping without SSRF guards, and server databases dedicated solely to storing reader trails.
Client-encoded fragment trails (#:~:text=, #t=, #trail=), strict IP/redirect allowlisting in /api/fetch-doc, sanitized --island-* theme tokens, and ECDSA P-256 receipts.
HTML lacks a built-in bidirectional transclusion primitive or native <web-island> contract for theme negotiation, intrinsic sizing, and tool calls without manual MessageChannel plumbing.