开发者

Rendering web page as thumbnail

I asked this question earlier, since I am a little new to Firefox extension development, the canvas thing for Firefox went a little over my head. Apologies for reposting this again.

  1. with the first answer there was this code snippet:
var path = this.getPref("path","string");

what are the path and string? yes I did look up for getPref in MDC but it made a little sense. Does Path refer to the URL of the web page that I am rendering(e.g: http://en.wikipedia.org/) and what does "String" refer to? I know 开发者_StackOverflow社区I might sound a little stupid but it seriously went over my head.

  1. After the images of the web pages are rendered, where are they saved? How do i know if the image has been rendered?

  2. With the draw window if I have framed the browser will it be window.frames[0] in place of content

context.drawWindow(content,0,0,canvas.height,canvas.width,"rgb(255,255,255)");


getPref is not a standard javascript function but perhaps it does something like this. Would be great if you post that "code snippet".

// getPref
// Syntax: "?width=80&height=25".getPref("width"); // Returns 80
String.prototype.getPref = function(s, splitter) {
  return this.split(s+"=")[1].split((splitter||"7"))[0];
};

After the images of the web pages are rendered, where are they saved?

Browser's cache?

How do i know if the image has been rendered?

look at img.complete

With the draw window if i have framed the browser will it be window.frames[0] in place of content context.drawWindow( content,0,0,canvas.height,canvas.width,"rgb(255,255,255)");

what?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜