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.
- 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.
After the images of the web pages are rendered, where are they saved? How do i know if the image has been rendered?
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?
精彩评论