Capture: send open shadow roots with the page #30
Labels
No labels
bug
documentation
enhancement
performance
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-chromium#30
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The capture sends
document.documentElement.outerHTML(src/lib/browser.js:66).outerHTMLleaves out every shadow root, so a board that draws its offer inside a web component arrives empty: the server-side sources read the same bare page a pasted URL gives.France Travail is one: on
candidat.francetravail.fr/offres/recherche/detail/<ID>the whole offer is inside the open shadow root of<descriptif-offre>. The page's light DOM holds only the<title>. Checked on 2026-10-10 with two live offers:outerHTMLwas 58,890 characters with the component empty, and its shadow root held another 36,464.What would change
document.documentElement.getHTML({ serializableShadowRoots: true, shadowRoots: [...open roots] })(Chrome 125+, Firefox 128+). Each open root becomes a declarative<template shadowrootmode="open">in place, which an HTML parser on the server reads as ordinary markup.querySelectorAll('*').el.shadowRootisnullfor closed roots, so they stay out, as they should.outerHTMLas the fallback wheregetHTMLis missing.Why it matters beyond one board
Web components are spreading on job boards. Postulo's own sources (JSON-LD, the readability fallback) gain the text too.
Found while building tiagoagueda/postulo-francetravail, an independent plugin and not one of Postulo's; its source reads the serialised shadow root. As usual, firefox follows chromium.