Search Central LiveDeep Dive Europe 2026

Knowledge base v2.13.0 · Community edition · data through 2 October 2026

Topic · Rendering and JavaScript

Embedding apps safely: Web Fragments

Web Fragments came from a community lightning talk by Natalia Venditto (Adobe), not from Google: a library for embedding apps, including AI-generated ones, in a host page without global JavaScript collisions, CSS bleed or fate sharing, where an error in the embedded app breaks the host. Her comparison slide said an iframe isolates scripts and styles but is walled off from the page's DOM, navigation and layout, shadow DOM isolates styles but shares JavaScript globals, and a rewrite means isolating by hand; Web Fragments meets all three criteria but needs browser patches today. It runs the embedded app's JavaScript in a hidden iframe, places its DOM in a shadow root of the host page, loads assets through a gateway from a standalone endpoint and virtualizes APIs such as document, history and location; the team backs the ShadowRealm standard proposal, which she said was at stage 2.7 at the time of the talk. None of this is in Google's documentation, which says Google flattens shadow DOM when rendering and generally, but not always, indexes iframe content as part of the embedding page. Author’s view: content in a fragment's shadow root can be indexed with the host page only if it shows in the rendered HTML, so test such pages in URL Inspection and keep the fragment's asset URLs crawlable. A second recording of Day 2 made her deployment advice clear: she recommended server-rendering web fragments, said a server-rendered app reframed into the host page is fully indexable, and reported an enormous performance increase (no figure given) when an app is reframed inside a fully client-side host, because it is rendered and interactive immediately (all said at the event).

What to do

  • Test pages that embed apps or fragments in URL Inspection: the host's own content must appear in the rendered HTML and the console must show no unhandled errors.
  • Make sure robots.txt does not block the gateway or endpoint URLs a fragment loads its assets from, on every host involved.
  • Do not rely on iframe content being indexed as part of your page.
  • Before embedding a widget in an iframe, test it with a keyboard and a screen reader and check layout and navigation.
  • Server-render web fragments, as their author recommends, and confirm in URL Inspection that the fragment's content appears in the rendered HTML.

Day 2: Indexing 40

Shown on screen 8

SlideNot in docsD2-C224

An iframe, the long-established way to embed an app, isolates both JavaScript and styles but is not part of the page: it is walled off from the host's DOM, navigation and layout, which Natalia Venditto said brings many problems with accessibility, layout and navigation.

“Walled off from DOM, navigation, layout”

Wording checked against the slide or recording

Speaker Natalia VendittoIn Day 2, 10:40 · Lightning session D: Rendering and JavaScriptEvidence slide photo, transcript

SlideD2-C230

The catch the comparison slide gave for rewriting everything was that you cannot rewrite code you did not write; Natalia Venditto explained that AI cannot rewrite code already in place because it does not know its requirements, design system or other constraints.

“Can't rewrite code you didn't write”

Wording checked against the slide or recording

Speaker Natalia VendittoIn Day 2, 10:40 · Lightning session D: Rendering and JavaScriptEvidence slide photo, transcript

SlideNot in docsD2-C242

A slide set out Web Fragments in five steps: an LLM writes the app and adds a custom element such as <web-fragment fragment-id="some-id"> to the HTML, a standalone HTTP endpoint is set up, the library is imported and initialized with initializeWebFragments(), the fragment is registered in the gateway, and step 5 is a celebration emoji.

Speaker Natalia VendittoIn Day 2, 10:40 · Lightning session D: Rendering and JavaScriptEvidence slide photo, transcript

Said on stage 25

StageNot in docsD2-C281

Polyfills work in two directions: they patch backwards where a browser lacks support, or patch forward to build now for a feature expected in the future, as Web Fragments does.

Speaker Erin SparlingIn Day 2, 11:15 · What is Google friendly JavaScriptEvidence transcript

  • Extends D2-C254 Day 2: Natalia Venditto said the ShadowRealm proposal would do much of what Web Fragments does today with patches…

What Google's documentation says 2

DocsSourceD2-C227

Google says its systems generally try to index the content of a page embedded with an iframe as part of the page that embeds it, but this is not guaranteed because both pages are also normal HTML pages on their own.

Publisher Google Search Central (SEO office hours transcript, December 2023), Search Central blog (21 January 2022)Annotates Day 2, 10:40 · Lightning session D: Rendering and JavaScript

Used byrequirement DEV-REN-10

DocsSourceD2-C235

Google's documentation says Google supports web components and flattens shadow DOM and light DOM content when it renders a page, and that content not visible in the rendered HTML cannot be indexed.

Publisher Google Search CentralAnnotates Day 2, 10:40 · Lightning session D: Rendering and JavaScript

Used byrequirement DEV-REN-10glossary term Shadow DOM

Analysis by the author 5

AnalysisD2-C222

Pages that embed third-party or AI-generated apps can share their fate, since an unhandled exception in the embedded code can break the host page; check the rendered HTML and JavaScript console output of such pages in Google's testing tools to make sure the host's own content still renders.

Author Ibrahim AnjroAnnotates Day 2, 10:40 · Lightning session D: Rendering and JavaScript

Used byrequirement DEV-REN-09

AnalysisD2-C240

Because Web Fragments monkey-patches core browser APIs such as document, history and location, test pages that use it in Google's rendering (the rendered HTML in Search Console's URL Inspection tool or the Rich Results Test), not only in a normal desktop browser.

Author Ibrahim AnjroAnnotates Day 2, 10:40 · Lightning session D: Rendering and JavaScript

Used byrequirement DEV-REN-10

AnalysisD2-C245

Make sure robots.txt does not block the URLs from which the browser loads a fragment's assets (the gateway paths on the host page's origin, or the endpoint's own host if assets load from there), because Google does not render JavaScript from blocked files and robots.txt rules apply per host.

Author Ibrahim AnjroAnnotates Day 2, 10:40 · Lightning session D: Rendering and JavaScript

AnalysisD2-C250

Because Google flattens shadow DOM when it renders, content that Web Fragments places in a shadow root can in principle be indexed with the host page, but only if it appears in the rendered HTML; check that in URL Inspection rather than relying on a library's promise of indexability.

Author Ibrahim AnjroAnnotates Day 2, 10:40 · Lightning session D: Rendering and JavaScript

Used byrequirement DEV-REN-10

Across days and sessions 1

  1. Stage D2-C281 Day 2 · What is Google friendly JavaScript

    Polyfills work in two directions: they patch backwards where a browser lacks support, or patch forward to build now for a feature expected in the future, as Web Fragments does.

    extends
    Stage D2-C254 Day 2 · Lightning session D: Rendering and JavaScript

    Natalia Venditto said the ShadowRealm proposal would do much of what Web Fragments does today with patches: containerizing and isolating execution.

Built on these claims 3

Developer requirements 3

Sources 5