diff --git a/docs/nested-player-frame-targeting.md b/docs/nested-player-frame-targeting.md new file mode 100644 index 0000000..b7f5b98 --- /dev/null +++ b/docs/nested-player-frame-targeting.md @@ -0,0 +1,212 @@ +# Targeting a nested cross-origin player without `webNavigation` (open) + +> **Status:** Largely fixed, one confirmed defect still open — see +> [Open: a dead frame election is never released](#open-a-dead-frame-election-is-never-released). +> Everything under *Fixed* was verified against the live site or a fixture rebuilt from it. +> +> Context: v3.1.2 added support for players inside cross-origin frames (Google Drive, +> anime hosts) and shipped with a `webNavigation` permission. The permission was not +> acceptable for the store listing, so `4d78970` removed it. Removing it broke the +> feature. This document records why, and what replaced it. + +--- + +## Why the permission mattered + +`chrome.webNavigation.getAllFrames({ tabId })` is an **observation**: a browser-side +registry lookup that returns every frame's `frameId` and `documentId` *without touching +the frames*. It answers while a frame is loading, navigating or being rebuilt. + +`chrome.scripting.executeScript({ target: { tabId, allFrames: true } })` is an +**intervention**: it must run code *inside* every frame. It is all-or-nothing — one frame +that is mid-teardown makes Chromium reject the whole call — and it only reports frames it +managed to enter. + +That difference is the entire regression. The players on these sites renavigate and +rebuild their `