简体   繁体   中英

Using chrome.tabs.captureVisibleTab() from DevTools console

I'm curious as to whether it is possible to take a screenshot directly from Chrome's DevTools using chrome.tabs.captureVisibleTab (be it from the console or from within a snippet), without going through the process of creating an extension.

Is this somehow possible? If not, how would you suggest going about taking a screenshot that reliably mimics the current page (html2canvas doesn't seem to render everything properly). Thanks for your help.

Here is a page screenshot tool provided by Google. After installed, you may open "chrome-extension://cpngackimfmofbokmjmljamhdncknpmg/js/page_context.js" in browser to see its code. This extension do not use Chrome Extension API. It works well in most pages, except some complicated pages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM