0

I want to get the screenshot command that is used by google chrome commands. If you open up the dev tools and see the console, you can run command+shift+p to get a drop down to run commands, and theres a command there for screenshots that you can use to drag over an area and take a screenshot. i am working on a chrome extension, and was wondering if its possible to utilize the same code/where can i find it?

I have tried other alternatives, and also have tried searching for the chrome code, but did not find anything in regards to it.

acehugh
  • 1
  • 1
  • Devtools is using [Overlay](https://chromedevtools.github.io/devtools-protocol/tot/Overlay).setInspectMode + Overlay.screenshotRequested. You can do the same using chrome.debugger API but there'll be a warning in the entire browser so it's probably a bad solution. You may want to implement overlay dragging via a js library in your content script, then call chrome.tabs.captureVisibleTab in the poup script and crop the image in Canvas. – wOxxOm Mar 06 '23 at 11:54

0 Answers0