开发者

Anything like canvas.drawWindow() in WebKit?

Does anybody know if there are plans to add som开发者_StackOverflowething comparable to Mozilla's

canvas.drawWindow()

to WebKit?

I wasn't able to find info about this on WebKit's mailing lists or elsewhere.

Thanks!


If you are developing a Google Chrome extension then you should check this:

http://code.google.com/chrome/extensions/tabs.html#method-captureVisibleTab


If you are building a web page then you should check this:

http://html2canvas.hertzen.com/


As MDN states:

This feature is only available for code running with Chrome privileges. It is not allowed in normal HTML pages.

Note: Chrome in this case refers to Firefox's User Interface.

This is mainly a feature that Mozilla has added for AddOns. I could, for example, imagine that an AddOn would render the WebSite onto the canvas and then get the ImageData(maybe do some processing before that) and then save it to disk. Useful for saving screen shots of WebPages or even doing Testing of Layout.

So since this is an Mozilla Extension and not a standard by any means, I see little(read: no) chances for it to be implemented by WebKit, you may want to file a bug for Chromium(http://code.google.com/p/chromium/issues/list) if you really want it for extension development, but even then you would not be able to use it in every day web pages.


I suggest you to keep look into the WHATWG discussion.

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-March/030862.html

I'm also try to implement html2canvas solution or the low level solution + . But in case of long page, is killing the web app.

Just for additional reading you can keep a look at:

https://developer.mozilla.org/en-US/docs/HTML/Canvas/Drawing_DOM_objects_into_a_canvas http://robert.ocallahan.org/2011/02/distinguishing-versus-web-resources_02.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜