开发者

Run context.drawWindow method through a bookmarklet

开发者 https://www.devze.com 2022-12-30 08:15 出处:网络
I want to capture a webpage as an image. I am able to do this using a firefox extension using context.drawWindow method. Now I want to strech myself and see if I can do this using a bookmarklet :)

I want to capture a webpage as an image. I am able to do this using a firefox extension using context.drawWindow method. Now I want to strech myself and see if I can do this using a bookmarklet :)

I remember reading somewhere that context.drawWindow() works only from the firefox toolbars. I dont know if that's still true or not.

Can anyone shed some light if I can execute context.drawWindow() fr开发者_运维百科om a bookmarklet or no?

Thanks Kapil


You can't, since bookmarklets run with the permissions of the page, and drawWindow is chrome-only (can only be used by Firefox UI and extensions, not Web pages).

0

精彩评论

暂无评论...
验证码 换一张
取 消