Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
15e3782
ci: open an issue when stable Chrome ships another DevTools frontend
jerrychan7 Nov 2, 2026
a793dc1
docs(dev): develop the next minor on dev/x.y.0, released through rele…
jerrychan7 Nov 2, 2026
a238e80
ci: run CI on pushes to main only, not to the dev branches
jerrychan7 Nov 2, 2026
9c51f7d
docs(roadmap): record what is planned and not done yet
jerrychan7 Nov 2, 2026
3e7bfe1
docs(roadmap): add iframes and what else the page can fill in
jerrychan7 Nov 2, 2026
4ace447
refactor(cdp-agent): look frames up in a registry, and count uses of …
jerrychan7 Nov 2, 2026
1dea788
feat(cdp-agent): register same-origin iframes in the frame registry
jerrychan7 Nov 2, 2026
b5fb95c
feat(cdp-agent): send same-origin iframe documents in the DOM tree
jerrychan7 Nov 2, 2026
f723a63
feat(cdp-agent): report mutations, navigations and removal of iframes
jerrychan7 Nov 2, 2026
3e7fe8d
refactor(cdp-agent): use the node's own realm in the DOM domain and s…
jerrychan7 Nov 2, 2026
3060288
refactor(cdp-agent): use the element's own realm in core/geometry
jerrychan7 Nov 2, 2026
c95d568
refactor(cdp-agent): tell CSSOM rule and sheet types apart across realms
jerrychan7 Nov 2, 2026
4ccce4f
refactor(cdp-agent): move the probe's network hooks into probe/networ…
jerrychan7 Nov 2, 2026
5713637
feat(cdp-agent): report same-origin iframes in the Page frame tree an…
jerrychan7 Nov 2, 2026
b81bacf
feat(cdp-agent): let the probe hook the network APIs of a same-origin…
jerrychan7 Nov 2, 2026
5363497
feat(cdp-agent): announce the style sheets of same-origin iframes
jerrychan7 Nov 2, 2026
46c5619
feat(cdp-agent): give each same-origin iframe document its own execut…
jerrychan7 Nov 2, 2026
0e8cf9d
feat(cdp-agent): place iframe nodes in the top viewport for box model…
jerrychan7 Nov 2, 2026
ec62c65
feat(cdp-agent): hit test into same-origin iframes in DOM.getNodeForL…
jerrychan7 Nov 2, 2026
639c631
fix(cdp-agent): resolve hooked request URLs against the document's ba…
jerrychan7 Nov 2, 2026
ffe7f43
feat(cdp-agent): report requests of same-origin iframes with their fr…
jerrychan7 Nov 2, 2026
bc43b16
test(cdp-agent): Network conformance for same-origin iframes
jerrychan7 Nov 2, 2026
6ebe618
feat(cdp-agent): highlight and inspect nodes of same-origin iframes
jerrychan7 Nov 2, 2026
4068456
feat(cdp-agent): match and compute the styles of iframe nodes in thei…
jerrychan7 Nov 2, 2026
6709a09
feat(cdp-agent): evaluate in the execution context of a same-origin i…
jerrychan7 Nov 2, 2026
7fc603f
feat(cdp-agent): edit iframe styles and give each frame its inspector…
jerrychan7 Nov 2, 2026
8ce7fd1
feat(cdp-agent): dispatch input into same-origin iframes
jerrychan7 Nov 2, 2026
4ae864c
feat(cdp-agent): force pseudo-classes on iframe elements
jerrychan7 Nov 2, 2026
b5e7108
chore(cdp-agent): lower the realm use counts after the iframe geometr…
jerrychan7 Nov 2, 2026
763c45a
refactor(cdp-agent): type the sheet registry's fetch without the glob…
jerrychan7 Nov 2, 2026
d581a18
feat(cdp-agent): capture console calls and uncaught errors of same-or…
jerrychan7 Nov 2, 2026
179ef46
merge: same-origin iframes in geometry, Overlay and Input
jerrychan7 Nov 2, 2026
89b38dd
merge: same-origin iframes in the CSS domain
jerrychan7 Nov 2, 2026
ca8a4e0
merge: same-origin iframes in the Network domain
jerrychan7 Nov 2, 2026
cd9f663
refactor(cdp-agent): use the frame's realm in Runtime, Page and Debugger
jerrychan7 Nov 2, 2026
fa452ba
merge: same-origin iframes in the Page and Runtime domains
jerrychan7 Nov 2, 2026
cc31147
docs: same-origin iframes in the changelog, usage limits and roadmap
jerrychan7 Nov 2, 2026
17f237a
docs: keep only what is left of iframes in the roadmap
jerrychan7 Nov 2, 2026
337167d
feat(cdp-agent): find same-origin iframes in shadow trees
jerrychan7 Nov 2, 2026
15dbc02
feat(cdp-agent): see shadow roots attached by scripts of same-origin …
jerrychan7 Nov 2, 2026
339add7
feat(cdp-agent): give same-origin <object> and <embed> documents a frame
jerrychan7 Nov 2, 2026
a7defd8
feat(cdp-agent): report navigations within the documents of frames
jerrychan7 Nov 2, 2026
c30a016
feat(cdp-agent): list each frame's own resources in Page.getResourceTree
jerrychan7 Nov 2, 2026
f4ed710
fix(cdp-agent): report the document of an <object> or <embed> once, i…
jerrychan7 Nov 2, 2026
9d8af89
docs: frames in shadow trees, <object> and <embed>, and same-document…
jerrychan7 Nov 2, 2026
c77a7ac
fix(cdp-agent): list child frames in the order Chrome made them
jerrychan7 Nov 2, 2026
5842cbd
feat(cdp-agent): report navigations intercepted through the Navigatio…
jerrychan7 Nov 2, 2026
ebbb64c
docs: navigations the Navigation API intercepts, and no frame differe…
jerrychan7 Nov 2, 2026
4d061a2
test(cdp-agent): drive real Chrome with cross-site iframes out of pro…
jerrychan7 Nov 2, 2026
67b82a7
test(cdp-agent): record Chrome's event sequences for cross-site iframes
jerrychan7 Nov 2, 2026
a00c3a4
docs(cdp-agent): note what Chrome does with cross-origin iframes
jerrychan7 Nov 2, 2026
3a147f2
test(cdp-agent): wait for the cross-site iframe to be drawn before cl…
jerrychan7 Nov 2, 2026
bc4311c
feat(cdp-agent): the contract between cross-origin iframe links and c…
jerrychan7 Nov 2, 2026
7ea9992
feat(devtools-anywhere): trusted origins across iframes, with subdoma…
jerrychan7 Nov 2, 2026
397f57e
feat(vite-plugin): frameOrigins and parentOrigins options
jerrychan7 Nov 2, 2026
9542a43
feat(devtools-anywhere): the parent's side of the cross-origin iframe…
jerrychan7 Nov 2, 2026
5b52630
feat(devtools-anywhere): the iframe's side of the cross-origin iframe…
jerrychan7 Nov 2, 2026
d111e73
feat(devtools-anywhere): close cross-origin iframe links, and link re…
jerrychan7 Nov 2, 2026
f8fa3c0
feat(devtools-anywhere): hide an iframe's own DevTools while its pare…
jerrychan7 Nov 2, 2026
9317be1
feat(cdp-agent): route a child target's messages by sessionId
jerrychan7 Nov 2, 2026
b2f18ca
feat(cdp-agent): attach cross-origin iframes as child targets
jerrychan7 Nov 2, 2026
4e93a13
feat(relay-core): pass child target sessions through, and detach them…
jerrychan7 Nov 2, 2026
88657ed
feat(cdp-agent): a cross-origin iframe's frame id and DOM.getFrameOwner
jerrychan7 Nov 2, 2026
005bcc4
merge: the handshake and trust lists of cross-origin iframe links
jerrychan7 Nov 2, 2026
14ccd7e
merge: the Target domain and sessionId routing for cross-origin iframes
jerrychan7 Nov 2, 2026
bf97baf
feat(cdp-agent): the frame ids of a page linked into its parent's fra…
jerrychan7 Nov 2, 2026
cedc459
feat(devtools-anywhere): reset an iframe's agent when its target's se…
jerrychan7 Nov 2, 2026
53377c9
test(cdp-agent): a linked cross-origin iframe as a child target, end …
jerrychan7 Nov 2, 2026
da9510e
fix(cdp-agent): DOM.requestChildNodes does not send children the clie…
jerrychan7 Nov 2, 2026
a29c6b9
test(e2e): a cross-origin iframe in the real frontend's Elements and …
jerrychan7 Nov 2, 2026
331af6e
fix(playground): listen on the loopback addresses themselves, not the…
jerrychan7 Nov 2, 2026
e150b26
feat(cdp-agent): forward mouse and touch input over a cross-origin if…
jerrychan7 Nov 2, 2026
6ef1eb2
fix(cdp-agent): a press or release away from the last move moves the …
jerrychan7 Nov 2, 2026
142e0d3
feat(cdp-agent): keys and text to a cross-origin iframe that has the …
jerrychan7 Nov 2, 2026
3aaf6a4
test(cdp-agent): input, hit testing and the overlay over a cross-orig…
jerrychan7 Nov 2, 2026
dd3afe7
refactor(cdp-agent): one frame id per frame owner, same-origin or cro…
jerrychan7 Nov 2, 2026
78a219e
feat(cdp-agent): keep a cross-origin iframe's target and session acro…
jerrychan7 Nov 2, 2026
70d0eda
test(cdp-agent): a linked iframe's lifecycle and its own iframe's tar…
jerrychan7 Nov 2, 2026
83e55d8
fix(cdp-agent): the parent page keeps its own press over a cross-orig…
jerrychan7 Nov 2, 2026
b00cc6d
feat(cdp-agent): chain a wheel's scroll from a cross-origin iframe to…
jerrychan7 Nov 2, 2026
a39489f
fix(devtools-anywhere): a reloaded frontend in shell mode is a new se…
jerrychan7 Nov 2, 2026
09cc869
test(cdp-agent): same-origin iframes inside linked cross-origin ifram…
jerrychan7 Nov 2, 2026
cc267a8
docs(cdp-agent): note one session per link and the reloaded frontend …
jerrychan7 Nov 2, 2026
d393d12
docs: cross-origin iframes in the changelog, the usage guide and the …
jerrychan7 Nov 2, 2026
2d99794
fix(playground): listen on every address when started by hand
jerrychan7 Nov 3, 2026
0687e92
refactor(devtools-anywhere): childTargets is no longer on window.Devt…
jerrychan7 Nov 3, 2026
2f0205d
feat(cdp-agent): a session per client with each cross-origin iframe t…
jerrychan7 Nov 3, 2026
8e53b72
test(cdp-agent): two clients attaching the same cross-origin iframe t…
jerrychan7 Nov 3, 2026
38d2ca3
fix(devtools-anywhere): reuse an iframe's ended client sessions
jerrychan7 Nov 3, 2026
1615aa8
docs: each client gets its own session with a cross-origin iframe
jerrychan7 Nov 3, 2026
939259c
fix(frame-links): link again when pinged while a link is still open
jerrychan7 Nov 3, 2026
73958a1
docs(frame-links): what a ping means to an iframe still linked
jerrychan7 Nov 3, 2026
9362404
fix(devtools-anywhere): tell an embedded frontend's reload by its com…
jerrychan7 Nov 3, 2026
b154fab
fix(devtools-anywhere): let any client of a page in shell mode set it…
jerrychan7 Nov 3, 2026
55a05ef
test(devtools-anywhere): device metrics from a shell page's other cli…
jerrychan7 Nov 3, 2026
ab30b6d
docs: device metrics from any client in shell mode
jerrychan7 Nov 3, 2026
f4299c3
fix(relay-core): keep a client's device metrics override across page …
jerrychan7 Nov 3, 2026
15c3bc6
test(remote-server): device metrics overrides across reloads in shell…
jerrychan7 Nov 3, 2026
2d9cdaa
fix(relay-core): re-send only a device metrics override the page took
jerrychan7 Nov 3, 2026
f6c8d1c
fix(devtools-anywhere): restore device metrics overrides after a relo…
jerrychan7 Nov 3, 2026
9fadaf6
test(remote-server): reload order, no-flash and repeated sets of devi…
jerrychan7 Nov 3, 2026
87d7c3c
docs: remote clients' device metrics survive page reloads
jerrychan7 Nov 3, 2026
34c9fc4
docs: a remote client gone during a reload keeps its device metrics u…
jerrychan7 Nov 3, 2026
1945428
fix(devtools-anywhere): say why device metrics cannot be overridden o…
jerrychan7 Nov 3, 2026
c47f8af
fix(devtools-anywhere): check device metrics and compare overrides as…
jerrychan7 Nov 3, 2026
789b40a
test(cdp-agent): note the nested-iframe lifecycle test's flaky history
jerrychan7 Nov 3, 2026
0a143ae
fix(devtools-anywhere): fail page agent commands the page cannot carr…
jerrychan7 Nov 3, 2026
3a0e622
docs: settle which page agent commands fail and list those still to do
jerrychan7 Nov 3, 2026
63e8ace
fix(remote-server): order remote clients' device metrics by their att…
jerrychan7 Nov 3, 2026
b3a41f1
docs: changelog for device metrics checks and commands the page canno…
jerrychan7 Nov 3, 2026
599ce98
fix(devtools-anywhere): settle focus emulation, safe area insets and …
jerrychan7 Nov 3, 2026
92c9b41
fix(devtools-anywhere): fail enabling domains only the browser has, a…
jerrychan7 Nov 3, 2026
4c4862d
docs: list domains that cannot be enabled and throttling among comman…
jerrychan7 Nov 3, 2026
5821057
fix(devtools-anywhere): enabling Audits succeeds, as issues are for t…
jerrychan7 Nov 3, 2026
73393a0
fix(devtools-anywhere): check nested device metrics fields and compar…
jerrychan7 Nov 3, 2026
9db2656
fix(devtools-anywhere): read env() values, fail security isolation st…
jerrychan7 Nov 3, 2026
f160a0d
docs: list security isolation status and feature flags among commands…
jerrychan7 Nov 3, 2026
ec7f205
fix(devtools-anywhere): forget a remote client's attach time when its…
jerrychan7 Nov 3, 2026
8dc374f
test(cdp-agent): read env() values without a type assertion
jerrychan7 Nov 3, 2026
f532914
fix(devtools-anywhere): forget every ended client's attach time in th…
jerrychan7 Nov 3, 2026
fe32076
fix(devtools-anywhere): a remote session's end lifts its override in …
jerrychan7 Nov 3, 2026
4f9630d
docs(devtools-anywhere): note where device metrics checks differ from…
jerrychan7 Nov 3, 2026
714fd0b
docs: device metrics checks in shell mode and where they differ from …
jerrychan7 Nov 3, 2026
01f4e17
fix(devtools-anywhere): align frames, geometry, page and debugger wit…
jerrychan7 Nov 3, 2026
6c9d093
refactor(devtools-anywhere): deduplicate helpers and tidy frame links…
jerrychan7 Nov 3, 2026
c4c9e53
docs: describe cross-origin iframe architecture and test builds
jerrychan7 Nov 3, 2026
3efb40d
fix(devtools-anywhere): release frame link, REPL and history state on…
jerrychan7 Nov 3, 2026
58d3a99
fix(devtools-anywhere): fix child target routing, runtime contexts an…
jerrychan7 Nov 3, 2026
7115036
test(devtools-anywhere): cover child target, frame link, runtime, CSS…
jerrychan7 Nov 3, 2026
20bcfe0
fix(devtools-anywhere): show a sandboxed iframe's document request in…
jerrychan7 Nov 3, 2026
f82415b
fix(devtools-anywhere): drop console utilities at the next task, as C…
jerrychan7 Nov 3, 2026
ac0bc1c
fix(devtools-anywhere): send requestChildNodes per parent, as Chrome …
jerrychan7 Nov 3, 2026
22640f0
fix(devtools-anywhere): list sandboxed iframes as Chrome does, and lo…
jerrychan7 Nov 3, 2026
7f331f4
chore(devtools-anywhere): pass the realm check and the tests' typeche…
jerrychan7 Nov 3, 2026
d8c4667
feat(devtools-anywhere): link sandboxed iframes to merge into the par…
jerrychan7 Nov 3, 2026
ce068b4
feat(devtools-anywhere): route CSS commands of merged sandboxed ifram…
jerrychan7 Nov 3, 2026
55d68b0
feat(devtools-anywhere): route Debugger and DOMDebugger to merged san…
jerrychan7 Nov 3, 2026
3c9b6aa
feat(devtools-anywhere): route Runtime and Log.clear to merged sandbo…
jerrychan7 Nov 3, 2026
37adf67
feat(devtools-anywhere): give a merged sandboxed iframe its document'…
jerrychan7 Nov 3, 2026
d8c4aa0
feat(devtools-anywhere): route a merged sandboxed iframe's Network co…
jerrychan7 Nov 3, 2026
56ee51e
fix(devtools-anywhere): report merged sandboxed frames' URLs and same…
jerrychan7 Nov 3, 2026
53e3aea
fix(devtools-anywhere): fan emulation out to merged sandboxed frames
jerrychan7 Nov 3, 2026
227287a
fix(devtools-anywhere): give a merged sandboxed frame's agent the pag…
jerrychan7 Nov 3, 2026
9628d13
feat(devtools-anywhere): let the DOM domain graft merged frames' docu…
jerrychan7 Nov 3, 2026
1783de0
feat(devtools-anywhere): show merged sandboxed frames' DOM as Chrome …
jerrychan7 Nov 3, 2026
a3399c8
feat(devtools-anywhere): highlight and inspect merged sandboxed ifram…
jerrychan7 Nov 3, 2026
e3ece49
feat(devtools-anywhere): route input into merged sandboxed iframes
jerrychan7 Nov 3, 2026
45a3e38
Merge branch 'refs/heads/worktree-agent-a2c72380ff224eb8c' into dev/0…
jerrychan7 Nov 3, 2026
58dd296
Merge branch 'refs/heads/worktree-agent-a53ab9b205b4c4c15' into dev/0…
jerrychan7 Nov 3, 2026
ddc5bae
Merge branch 'refs/heads/worktree-agent-aeb1a7082b9d5dd03' into dev/0…
jerrychan7 Nov 3, 2026
6ac5553
Merge branch 'refs/heads/worktree-agent-a0c0048387c6d5614' into dev/0…
jerrychan7 Nov 3, 2026
ca8ee38
Merge branch 'refs/heads/worktree-agent-aee9a20fe57e37954' into dev/0…
jerrychan7 Nov 3, 2026
8d272ea
Merge branch 'refs/heads/worktree-agent-a5ea327a91633cecc' into dev/0…
jerrychan7 Nov 3, 2026
ec0a5ec
test(devtools-anywhere): drop temporary merged-frame routes from sand…
jerrychan7 Nov 3, 2026
2238d4f
docs: document merging sandboxed iframes into the parent target
jerrychan7 Nov 3, 2026
db85985
fix(devtools-anywhere): keep a session's pending command when a neste…
jerrychan7 Nov 4, 2026
5e16c01
fix(devtools-anywhere): answer an unknown uniqueContextId with Invali…
jerrychan7 Nov 4, 2026
d6f9edf
fix(devtools-anywhere): end an evaluation whose frame went cross-origin
jerrychan7 Nov 4, 2026
0d8d714
fix(devtools-anywhere): drop a merged highlight overtaken while awaited
jerrychan7 Nov 4, 2026
641151b
test(devtools-anywhere): let each sandboxed CSS test set itself up
jerrychan7 Nov 4, 2026
99fca41
refactor(devtools-anywhere): classify a child document with one frame…
jerrychan7 Nov 4, 2026
58c155b
refactor(devtools-anywhere): reattach NodeRegistry's doc comment and …
jerrychan7 Nov 4, 2026
d5992c0
fix(devtools-anywhere): fill every position of a repeated merged back…
jerrychan7 Nov 4, 2026
9607f65
fix(devtools-anywhere): give each merged document its own namespace a…
jerrychan7 Nov 4, 2026
ae2929b
docs(devtools-anywhere): agree on why callFunctionOn rejects a foreig…
jerrychan7 Nov 4, 2026
b16bab2
test(devtools-anywhere): tie script and console events to the frame's…
jerrychan7 Nov 4, 2026
8803aaf
fix(devtools-anywhere): drop queued merged-frame changes on Page.disa…
jerrychan7 Nov 4, 2026
a497cad
fix(devtools-anywhere): undo and redo edits of merged sandboxed frame…
jerrychan7 Nov 4, 2026
973f3b1
test(devtools-anywhere): compare edits of a merged sandboxed frame wi…
jerrychan7 Nov 4, 2026
ff1a2ef
test(devtools-anywhere): compare a merged sandboxed iframe's reload w…
jerrychan7 Nov 4, 2026
e75e463
fix(devtools-anywhere): keep a merged document's namespace when it li…
jerrychan7 Nov 4, 2026
314c3dd
test(devtools-anywhere): cover a merged document linked again keeping…
jerrychan7 Nov 4, 2026
3ad93f1
Merge branch 'refs/heads/worktree-agent-a8d176038bbe9ea59' into dev/0…
jerrychan7 Nov 4, 2026
694004f
Merge branch 'refs/heads/worktree-agent-ac7b2c005ace216a8' into dev/0…
jerrychan7 Nov 4, 2026
917e3bb
Merge branch 'refs/heads/worktree-agent-ac2a25ed791b07864' into dev/0…
jerrychan7 Nov 4, 2026
04350da
Merge branch 'refs/heads/worktree-agent-a1405ac51bb055692' into dev/0…
jerrychan7 Nov 4, 2026
1572625
docs: sync docs with the merged sandboxed iframe fixes
jerrychan7 Nov 4, 2026
22fa28d
docs(devtools-anywhere): note the unverified origin of a navigated sa…
jerrychan7 Nov 4, 2026
14858b4
docs(devtools-anywhere): shelve cross-origin sandboxed iframes, drop …
jerrychan7 Nov 4, 2026
34e4452
docs(devtools-anywhere): narrow the sandboxed exception limitation
jerrychan7 Nov 4, 2026
39091f3
docs(devtools-anywhere): shelve the sandboxed about:blank context and…
jerrychan7 Nov 4, 2026
74014c8
build: release 0.3.0
jerrychan7 Nov 4, 2026
9b38710
test: drop platform-dependent details from two CI-failing tests
jerrychan7 Nov 4, 2026
cfcd297
docs: list the API changes of 0.3.0 in the changelogs
jerrychan7 Nov 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .github/workflows/chrome-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Checks every day whether stable Chrome ships another devtools-frontend commit than the one pinned
# in packages/devtools-frontend/REVISION, minor versions included (DEV.md, "Working on the
# frontend"), and opens an issue for it. It builds nothing: the update itself is done by hand.
#
# Chromium Dash's JSON endpoint (the one build.ts --latest reads) has no documentation nor promise:
# its answer is checked, and a run fails, rather than passes, when it is not what is expected.
name: Chrome update

on:
schedule:
- cron: '17 3 * * *'
workflow_dispatch:

permissions:
contents: read
issues: write

concurrency:
group: chrome-update
cancel-in-progress: false

jobs:
check:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
packages/devtools-frontend/REVISION
packages/devtools-frontend/package.json
sparse-checkout-cone-mode: false

- name: Stable Chrome
id: stable
run: |
curl -fsS --retry 3 --max-time 30 \
'https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Mac&num=1' > release.json
node -e '
const [release] = JSON.parse(require("fs").readFileSync("release.json", "utf8"));
const version = release?.version, devtools = release?.hashes?.devtools;
if (!/^\d+(\.\d+){3}$/.test(version ?? "") || !/^[0-9a-f]{40}$/.test(devtools ?? ""))
throw new Error("Chromium Dash answered without a version or a devtools commit");
console.log(`version=${version}\ndevtools=${devtools}`);
' >> "$GITHUB_OUTPUT"

- name: Open an issue if it ships another frontend
env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ steps.stable.outputs.version }}
DEVTOOLS: ${{ steps.stable.outputs.devtools }}
run: |
pinned=$(tr -d '[:space:]' < packages/devtools-frontend/REVISION)
chrome=$(node -p "require('./packages/devtools-frontend/package.json').chrome")
echo "Pinned: Chrome $chrome, devtools $pinned. Stable: Chrome $VERSION, devtools $DEVTOOLS."
[ "$pinned" = "$DEVTOOLS" ] && exit 0

title="Update the DevTools frontend to Chrome $VERSION"
open=$(gh issue list --repo "$GITHUB_REPOSITORY" --state open --search "in:title \"Update the DevTools frontend to Chrome\"" \
--json number,title --jq '.[] | "\(.number)\t\(.title)"')
if printf '%s\n' "$open" | cut -f2 | grep -qxF "$title"; then
echo "Already open: $title"
exit 0
fi

new=$(gh issue create --repo "$GITHUB_REPOSITORY" --title "$title" --body "$(cat <<EOF
Stable Chrome is now $VERSION, which ships devtools-frontend [\`$DEVTOOLS\`](https://chromium.googlesource.com/devtools/devtools-frontend/+/$DEVTOOLS); \`REVISION\` pins \`$pinned\` (Chrome $chrome).

\`\`\`bash
pnpm --filter @devtools-anywhere/devtools-frontend update
\`\`\`

Then as in DEV.md, "Working on the frontend": the patches, \`pnpm test\`, \`pnpm licenses:update\`, and the changelogs.

Opened by \`.github/workflows/chrome-update.yml\`.
EOF
)")
echo "Opened $new"

# An older update not done yet is replaced by this one.
printf '%s\n' "$open" | while IFS=$'\t' read -r number old; do
[ -n "$number" ] || continue
gh issue close "$number" --repo "$GITHUB_REPOSITORY" --reason "not planned" --comment "Superseded by $new."
done
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Checks every push to main and every pull request: lint, types, the DevTools frontend built from
# source at the pinned REVISION, and all tests against Chrome for Testing at the version the
# frontend comes from (the packages' "chrome" field).
# frontend comes from (the packages' "chrome" field). Not the pushes to the development branches
# (dev/x.y.0): they are checked by the release pull request, or by hand (workflow_dispatch).
#
# Caches (actions/cache: a key that misses is saved at the end of the job; a hit is not saved
# again):
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ Thumbs.db

node_modules/
dist/
dist-test/
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@ All packages share one version and are released together (see DEV.md, "Releasing

## Unreleased

## 0.3.0

Based on Chrome 156 (156.0.8078.80).

- Same-origin iframes, as in Chrome: Elements expands them; each has its frame in the Page tree and its execution context in the Console's context menu, with its console messages and errors; Styles shows its own sheets and media; Network tags its requests with its frame; highlighting, inspect mode and Input reach into it. Iframes in shadow trees and same-origin `<object>` and `<embed>` documents are frames too; `Page.getResourceTree` lists each frame's own resources. Logs and requests an iframe makes before its load event are missing (except for srcdoc and blank iframes), and its navigations are reported once loaded.
- Cross-origin iframes whose page loads the probe too, when each side trusts the other (`data-frame-origins` in the parent, `data-parent-origins` in the iframe; the Vite options `frameOrigins` and `parentOrigins`): they are child targets, as Chrome's out-of-process iframes, through `Target.setAutoAttach` and messages routed by `sessionId`, in every setup (embedded, shell mode, remote). Elements shows their document under the `<iframe>` (`DOM.getFrameOwner`), the Console their contexts; input over them reaches them, and wheels chain back to the parent. Each client attaching them gets a session of its own, as in Chrome (the page's DevTools and a remote agent at once). Their targets survive navigations, and iframes in them link level by level.
- Sandboxed iframes without `allow-same-origin` (with a `src` of the page's origin, `about:blank` or `srcdoc`) whose document loads the probe, when the parent lists `sandboxed` in `data-frame-origins` and the document the parent's origin in `data-parent-origins`: they are merged into the parent's target, as Chrome keeps them there, with no child target. Elements shows their document under the `<iframe>`, the Console their context and messages, Network their requests, Sources their scripts, Styles their sheets; highlighting, inspect mode and Input reach into them. Off by default; those with a `src` of another origin, same-site too, are still refused. The remaining gaps are in the usage guide's limitations.
- `DOM.getNodeForLocation` takes document coordinates, not viewport ones, and `DOM.scrollIntoViewIfNeeded` centers an element that is out of view, as in Chrome. Hovering with `Input.dispatchMouseEvent` sends `pointerout`, `pointerover`, `mouseout`, `mouseover` in Chrome's order.
- `Page.navigatedWithinDocument` for `history.pushState`, `replaceState`, fragment changes and navigations the Navigation API intercepts, in the top page and in frames.
- Requests the page made before the probe ran are reported from Resource Timing (without stack, headers or body), as Chrome reports them too.
- `DOM.requestChildNodes` no longer sends children the client already has, as in Chrome: the frontend asking twice emptied an expanded iframe.
- In shell mode, a reloaded frontend starts a new session, as in Chrome.
- In shell mode, `Emulation.setDeviceMetricsOverride` and `clearDeviceMetricsOverride` work from any client of the page (a remote agent, a `createCdpSession`), not only the shell's frontend: the last override set applies, and a client's clear or end only lifts its own; a remote client's override survives page reloads, re-applied in the order the clients attached, as in Chrome. Their parameters are checked with Chrome's errors; outside shell mode the two commands fail, saying so.
- Commands the page cannot carry out (auto dark mode, turning focus emulation on, the pinch zoom, background services, bypassing the Service Worker, autofill addresses, the security isolation status, browser feature flags, network throttling, enabling domains whose events only the browser has such as the profilers, …) fail with "Not supported in the page: <why>" instead of succeeding without effect or answering with made-up data; `CSS.getEnvironmentVariables` returns the env() values the page resolves; those that could be done in the page still succeed, and are listed in the roadmap.
- An embedded frontend that reloads is told by its command ids starting again, not by its frame's load event, which comes after its first commands: what it enabled at once is no longer ended by the load.
- `CSS.createStyleSheet` fails with "Frame not found" for an unknown `frameId`, as in Chrome.
- Merged sandboxed iframes, as in Chrome: each new document gets new ids, and a reloaded one's execution contexts are destroyed and not reused, while a document linking again keeps its own; DOM undo and redo cover the page and its merged frames in one history, in the order of the edits, CSS edits in the frames included; a frame not answering within 1 s for its document, a node or a point is taken as not answering; `Page.navigate` takes a sandboxed iframe's `frameId`, merged or not; after `Page.disable`, the frames' queued events are no longer sent.

### API changes

Public API, as in `packages/*/etc/*.public.api.md`: additions only, nothing removed, renamed or changed.

- Probe script attributes (`devtools-anywhere`): `data-frame-origins` (origins of cross-origin iframes this page's DevTools debugs, space-separated; `sandboxed` for its sandboxed iframes) and `data-parent-origins` (origins of the pages that may debug this one in their iframe).
- Vite plugin options (`@devtools-anywhere/vite-plugin`): `frameOrigins` and `parentOrigins` (arrays), written into those two attributes.
- CDP: commands the page cannot carry out now fail with -32000 "Not supported in the page: <reason>" instead of succeeding without effect (listed above); `CSS.createStyleSheet` with an unknown `frameId` fails. Other changes to CDP answers and events are behavior fixes towards Chrome, listed above.
- The messages between the probe, the shell and the remote server gained the internal methods `DevtoolsAnywhere.attach` and `DevtoolsAnywhere.metrics`: use the probe and `@devtools-anywhere/remote-server` of the same version.

## 0.2.0

Based on Chrome 156 (156.0.8078.80).
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@

## Unreleased

## 0.3.0

基于 Chrome 156(156.0.8078.80)。

- 支持同源 iframe,与 Chrome 一致:Elements 能展开;每个 iframe 在 Page 的 frame 树里有自己的 frame,在 Console 的上下文菜单里有自己的执行上下文,带着它的 console 消息和错误;Styles 显示它自己的样式表和媒体条件;Network 的请求标出所属 frame;高亮、检查模式和 Input 都能进入 iframe。shadow tree 里的 iframe 以及同源 `<object>`、`<embed>` 的文档同样是 frame;`Page.getResourceTree` 列出每个 frame 自己的资源。iframe 在 load 事件之前的日志和请求拿不到(srcdoc 和空 iframe 除外),导航要加载完成后才报出。
- 支持跨域 iframe:iframe 页面也加载探针,并且双方互相信任时(父页面配 `data-frame-origins`,iframe 页面配 `data-parent-origins`;Vite 选项为 `frameOrigins`、`parentOrigins`),它们作为子 target 接入,和 Chrome 的进程外 iframe 一样,通过 `Target.setAutoAttach` 和按 `sessionId` 转发的消息工作,直接嵌入、外壳模式、远程调试都支持。Elements 把它们的文档显示在 `<iframe>` 下(`DOM.getFrameOwner`),Console 里有它们的执行上下文;落在它们上面的输入会转进去,滚轮滚到底会传回父页面。每个接入它们的客户端各有自己的会话,与 Chrome 一致(比如页面上的 DevTools 和远程连入的 agent 同时调试)。导航后 target 保留,iframe 里再嵌的跨域 iframe 逐级接入。
- 支持没有 `allow-same-origin` 的沙箱 iframe(`src` 与页面同源、`about:blank` 或 `srcdoc`):沙箱文档加载探针,父页面的 `data-frame-origins` 写 `sandboxed`、沙箱文档的 `data-parent-origins` 写父页面的源时,它并入父页面的 target,和 Chrome 一样留在那里,不开子 target。Elements 把它的文档显示在 `<iframe>` 下,Console 里有它的执行上下文和消息,Network 有它的请求,Sources 有它的脚本,Styles 有它的样式表;高亮、检查模式和 Input 都能进入它。默认关闭;`src` 跨源的仍然拒绝,同站的也一样。其余差异见使用说明的限制。
- `DOM.getNodeForLocation` 按文档坐标而不是视口坐标计算;`DOM.scrollIntoViewIfNeeded` 对不在视口内的元素滚到居中,与 Chrome 一致。`Input.dispatchMouseEvent` 悬停时按 Chrome 的顺序发出 `pointerout`、`pointerover`、`mouseout`、`mouseover`。
- `history.pushState`、`replaceState`、hash 变化以及 Navigation API 拦截的导航会发出 `Page.navigatedWithinDocument`,顶层页面和 frame 都是。
- 探针运行之前页面发出的请求,改为从 Resource Timing 补报(没有调用栈、请求头和请求体),Chrome 同样会报这些请求。
- `DOM.requestChildNodes` 不再重复发送客户端已有的子节点,与 Chrome 一致:前端请求两次时,展开的 iframe 会变成空白。
- 外壳模式下重新加载的前端开始一个新会话,与 Chrome 一致。
- 外壳模式下,页面的任何客户端(远程连入的 agent、`createCdpSession`)都能用 `Emulation.setDeviceMetricsOverride` 和 `clearDeviceMetricsOverride`,不再只限外壳自带的前端:以最后一次设置为准,客户端清除或断开时只撤销自己的设置;远程客户端的设置在页面重新加载后仍然有效,按客户端连上的先后重新应用,与 Chrome 一致。参数按 Chrome 的规则校验,报错相同;非外壳模式下这两条命令返回错误并说明原因。
- 页面做不到的命令(自动深色模式、开启焦点模拟、双指缩放、后台服务记录、绕过 Service Worker、自动填充地址、安全隔离状态、浏览器功能开关、网络限速、启用性能分析器等只有浏览器才有事件的域等)改为返回错误「Not supported in the page: <原因>」,不再假装成功或编造数据;`CSS.getEnvironmentVariables` 返回页面解析出的 env() 值;能在页面里实现、只是还没做的仍返回成功,并记进路线图。
- 直接嵌入的前端重新加载后,改为按命令 id 重新从 1 开始来判断,不再看 iframe 的 load 事件:load 晚于新前端的第一批命令,会把它刚启用的东西又关掉。
- `CSS.createStyleSheet` 遇到不存在的 `frameId` 时报错「Frame not found」,与 Chrome 一致。
- 并入的沙箱 iframe 与 Chrome 对齐:每个新文档分配新的 id,重新加载时销毁旧的执行上下文且 id 不复用,同一文档重新链接时沿用原来的;DOM 的撤销和重做把页面和并入的 frame 放在同一个历史里,按编辑先后,frame 里的 CSS 编辑也在内;向 frame 取文档、节点或坐标 1 秒内没有应答,按未应答处理;`Page.navigate` 接受沙箱 iframe 的 `frameId`,并入与否都行;`Page.disable` 之后不再发出 frame 排队的事件。

### 接口变化

公开 API(以 `packages/*/etc/*.public.api.md` 为准)只有新增,没有删除、改名或改动。

- 探针脚本属性(`devtools-anywhere`):新增 `data-frame-origins`(本页 DevTools 可以调试的跨域 iframe 的源,空格分隔;写 `sandboxed` 调试它的沙箱 iframe)和 `data-parent-origins`(可以在 iframe 里调试本页的父页面的源)。
- Vite 插件选项(`@devtools-anywhere/vite-plugin`):新增 `frameOrigins` 和 `parentOrigins`(数组),写进上面两个属性。
- CDP:页面做不到的命令改为报错 -32000「Not supported in the page: <原因>」,不再返回成功却没有效果(见上文);`CSS.createStyleSheet` 遇到不存在的 `frameId` 时报错。CDP 应答和事件的其他变化都是向 Chrome 对齐的行为修正,见上文。
- 探针、外壳和远程服务之间的消息新增内部方法 `DevtoolsAnywhere.attach` 和 `DevtoolsAnywhere.metrics`:探针和 `@devtools-anywhere/remote-server` 请使用同一版本。

## 0.2.0

基于 Chrome 156(156.0.8078.80)。
Expand Down
Loading
Loading