Let canvas extensions capture the exact pixels shown in a browser preview
- 主要语言
- 没有语言数据
- 星标
- 2.1k
- 派生
- 153
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Feature summary
screenshot API for canvas extensions
### What problem are you trying to solve?
Today, an extension can inspect or rebuild the page, but it cannot capture the actual rendered preview. Rebuilding it from the DOM gives different results for responsive layouts, fonts, canvas, video, WebGL, embedded content, and browser-rendered effects.
### Proposed solution
Could the canvas provide a screenshot API that:
- Captures the visible preview exactly as rendered.
- Uses the current viewport size and device pixel ratio.
- Captures compositor output instead of rebuilding the DOM.
- Returns a PNG or blob to the extension.
- Only gives an extension access to its own canvas.
I only need the visible preview, not a full-page screenshot or the surrounding Copilot UI. This would make visual annotation reliable and framework-independent.
### Workflow impact
_No response_
### Installation context
_No response_
### Additional context
_No response_
贡献指南
调研方向
未指定任何文件、测试或入口点。首先定位 canvas 扩展和浏览器预览实现,然后跟踪可见 compositor 输出的生成过程;当一个受限范围的 API 能够在当前尺寸和 device pixel ratio 下返回精确的 viewport 截图,且不暴露周围的 UI 时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 领域
- frontend
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100