通过书签运行 context.drawWindow 方法

发布于 2024-09-02 01:05:11 字数 237 浏览 6 评论 0原文

我想将网页捕获为图像。我可以使用 context.drawWindow 方法使用 firefox 扩展来完成此操作。现在我想伸展一下自己,看看是否可以使用书签来做到这一点:)

我记得在某处读到 context.drawWindow() 仅适用于 Firefox 工具栏。我不知道这是否仍然正确。

如果我可以从书签执行 context.drawWindow() 或不执行,任何人都可以透露一些信息吗?

谢谢 卡皮尔

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() from a bookmarklet or no?

Thanks
Kapil

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

云柯 2024-09-09 01:05:11

你不能,因为小书签以页面的权限运行,并且drawWindow仅适用于chrome(只能由Firefox UI和扩展使用,不能由网页使用​​)。

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文