github / github/app

Let canvas extensions capture the exact pixels shown in a browser preview

Open
#3,184 0 comments 0 reactions 0 assignees View on GitHub
triage
Dominant language
No language data
Stars
2.1k
Forks
153
PR merge metrics
No merged PRs in 30d

Description

### 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_

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by locating the canvas extension and browser preview implementation, then trace how the visible compositor output is produced; done means a scoped API can return an exact viewport screenshot at the current size and device pixel ratio without exposing surrounding UI.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.