Six ways to get a surface into a host that did not ask for it, scored on the six axes you do not get to choose. Open this page when a new host arrives, and work the axes in the order the delivery-constraints lesson sets out — eliminate on their response headers and their build first, then score what survives.
Nothing here scores well on everything, and a mode that scores Weak on an axis you do not care about in this host is not disqualified. The scores are a prompt for the question “does this host care about this axis,” not a ranking to sum.
The multiplier comes first
Write down how many hosts this has to work in before you read a single row. At one host, the native rewrite wins on almost every axis and you should take it. At ninety, it is the only option on the table that does not amortise, and the mechanism that is second-best everywhere beats the mechanism that is best once.
An autonomous custom element, usually with a shadow root, shipped as one script the host loads.
Pick it when: The default at high host counts. Pick it unless a specific host fact rules it out.
Runtime remote module loading with a shared dependency graph, configured in both builds.
Pick it when: The host already runs it. Adopting it for your sake alone is rarely proportionate.
An orchestration layer: a root config registers applications and mounts or unmounts them as routes activate.
Pick it when: The host already runs it, or the real problem is routing between several applications rather than embedding one surface.
A separate document embedded in theirs, with every interaction serialised across an origin-checked message channel.
Pick it when: Hostile or unknowable hosts, hard security boundaries, or anywhere you must guarantee you cannot break their application.
A script that finds a mount element and renders into the light DOM, with no shadow root.
Pick it when: Simple surfaces in hosts with a clean, low-specificity stylesheet — or where accessibility across a boundary is the binding constraint and isolation is not.
Build the surface again, in their stack, with their components and their tests.
Pick it when: One host, or a strategically important host where nothing else clears review. Never as a portfolio-wide strategy — it is the one option that does not amortise.
Every score above rests on a documented behaviour rather than an impression. The load-bearing ones, with the date each was checked:
frame-src — who may embed you, versus what you may embed — and notes it is not supported in a <meta> element.unsafe-inline keyword is ignored by browsers.” A policy containing both is not permissive.singleton, “if the shared dependencies between the producer and the consumer have different versions, each side will load its own dependencies.” That duplication is what breaks React hooks in a federated graft.frame-sizing page explains why: “For security and privacy reasons, <iframe> elements do not by default expose any information to the parent document about the size of the content in the document they are embedding.” That standards-track fix had limited availability as of 2026-09-03, so a postMessage height shim is still required in production.targetOrigin, not *,” and on receipt “always verify the sender’s identity using the origin and possibly source properties.”sandbox attribute — making it no more secure than not using the sandbox attribute at all.”Whether constructed stylesheets (adoptedStyleSheets and CSSStyleSheet.replaceSync()) are subject to a host’s style-src directive is not documented in any primary source found for this course. MDN covers insertRule() and cssText, and notes that no browser currently blocks them, but says nothing about constructed stylesheets either way. What is documented is that a runtime <style> injection is blocked without 'unsafe-inline' or a nonce — which is why CSS-in-JS needs nonce plumbing in a strict host. Test the constructed path against the specific host rather than assuming either answer.
Browser behaviour on these pages is dated on purpose — support for shadow-DOM, form-association and ARIA-reflection features has moved repeatedly, and a claim without a date is a claim that will quietly rot. If a source looks wrong or out of date, check the resource list and tell your teaching agent — the course is meant to be corrected.