Manifest V3 Architecture & Performance
How the service worker, content scripts and editor work together to capture a page.
Service worker and content scripts
ClickSnap is a Manifest V3 extension. Its background code is a service worker that Chrome starts when you press a shortcut or click the toolbar icon, and stops again when it is idle.
Who does what
The service worker handles shortcuts and takes each screen capture with chrome.tabs.captureVisibleTab. A small content script, injected only into the tab you are capturing (activeTab), scrolls the page, hides sticky elements and restores everything afterwards. The editor is an extension page that stitches the screens and lets you annotate and export.
The full-page capture pipeline
What happens when you press Alt+Shift+F:
Step by step
Each step runs on your computer; nothing is uploaded.
Measure
The content script measures the page, or the main scrolling panel for apps that scroll inside a box.
Scroll and capture
It scrolls one screen at a time and waits for the page to paint. The service worker captures each screen, paced to Chrome’s limit of about two captures per second, and shows progress on the toolbar icon.
Hide sticky elements
After the first screen, fixed and sticky elements are hidden so headers appear once. Elements that appear later are caught too.
Restore
Scroll position and every hidden element are restored exactly as they were.
Stitch in the editor
The screens are kept as PNG images in the browser’s IndexedDB, and the editor draws them straight onto its canvas, so you see the result as soon as the last screen is captured.
Limits
Constraints that come from Chrome itself:
What to expect
Capture speed is about half a second per screen, because Chrome limits how often an extension can capture the tab. A canvas can be at most 16,384 pixels tall, so longer pages are shown scaled down in the editor; Export → Very long page saves them at full resolution as several images or one PDF.
Was this documentation helpful?
Your feedback helps us continuously improve technical guides.