基线:全量源码首提(D1 版本控制落地,含第一轮优化 B1-B4/A1/A4/缩放修复)

This commit is contained in:
dqb-dev
2026-10-01 22:15:22 +08:00
commit 1e65792b09
499 changed files with 204579 additions and 0 deletions
@@ -0,0 +1,12 @@
# Browser Capability: viewport
Use an explicit viewport only for responsive or device-size testing. Otherwise keep the normal IAB viewport.
```js
await tab.setViewportSize({ width: 1280, height: 720 });
nodeRepl.write(JSON.stringify(tab.viewportSize()));
```
`setViewportSize()` automatically opens the IAB responsive canvas. Its width and height are CSS pixels,
and responsive mode uses DPR 1 so a viewport screenshot has matching PNG pixel dimensions. Exiting
responsive mode in the UI clears the override and restores the host's natural DPR.