private static void DrawWindow(nsIDOMHTMLCanvasElement canvasElement, nsIDOMWindow domWindow, Color bgColor, CaptureFlags captureFlags)
		{
			var context = (nsIDOMCanvasRenderingContext2D)canvasElement.GetContext("2d", JsVal.JSVAL_NULL);
			String cssBgColor = String.Format(CssColorFormatInfo.CurrentInfo, "{0:rgba}", bgColor);
			context.DrawWindow(domWindow, 0, 0, canvasElement.Width, canvasElement.Height, cssBgColor, (UInt32)captureFlags);
		}
 public nsISupports getContext(string contextId)
 {
     return(DOMHTMLElement.GetContext(new nsAString(contextId), IntPtr.Zero));
 }
 public nsISupports getContext(string contextId)
 {
     return(DOMHTMLElement.GetContext(new nsAString(contextId), default(JsVal)));
 }