Commit Graph
1 Commits
Author SHA1 Message Date
ldm0 c6afc4b322 fix(modules): preserve document policy for module preloads
Capture the exact Document's default referrer policy when preparing a
modulepreload request, separately from the module's persistent script options.
Carry it through single-module fetch reservations into the actual network
request, including main and child parser and connected-link paths.

Seed the HTML preload scanner with the response policy and snapshot meta
policies in token order for parser modules and modulepreload links. Seed
insertion scans with the live policy without scanning an idle Document.
Admit child links at FinishParsingChildren so a later meta in the same parser
batch cannot overwrite an earlier request's policy or duplicate link terminals.

Cover same/cross-origin requests, response and meta defaults, explicit and
invalid attributes, late meta tags, module-map reuse, and dynamic imports
from preloaded modules after a policy change with real HTTP regressions.
2026-11-21 20:03:26 +08:00