This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
The non-standard and internal only
.asyncDrawXULElement() method of the Canvas 2D API renders a region of a XUL element into the
This API cannot be used by Web content. It is chrome only.
void ctx.asyncDrawXULElement(element, x, y, w, h, bgColor, flags = 0);
- The X coordinate of the element.
- The Y coordnate of the element.
- The width of the element.
- The height of the element.
DOMStringthat specifies the color the canvas is filled with before the element is rendered into it. This color may be transparent/translucent. It is given as a CSS color string (for example,
- flags Optional
- Used to better control the
asyncDrawXULElementcall. Flags can be ORed together.
Constant Value Description
Show the caret if appropriate when drawing.
Do not flush pending layout notifications that could otherwise be batched up.
Draw scrollbars and scroll the viewport if they are present.
Use the widget layer manager if available. This means hardware acceleration may be used, but it might actually be slower or lower quality than normal. It will, however, more accurately reflect the pixels rendered to the screen.
Do not synchronously decode images - draw what we have.
Not part of any current specification or draft. This is a non-standard and internal only API.
|Feature||Chrome||Firefox (Gecko)||Internet Explorer||Opera||Safari|
|Basic support||Not supported||(Yes)||Not supported||Not supported||Not supported|
|Feature||Android||Chrome for Android||Firefox Mobile (Gecko)||IE Mobile||Opera Mobile||Safari Mobile|
|Basic support||Not supported||Not supported||(Yes)||Not supported||Not supported||Not supported|
- The interface defining it,