On Monday, December 19, 2011 7:52:47 AM UTC+1, Jim wrote:
>
> I'm adding a canvas element to a panel in an extension I'm working
> on.  Unfortunately (using a try/catch block) I'm getting the following
> in FB_TRACE:
>
> "TypeError: canvas.getContext is not a function"
>
> I'm using the following in my extension to add the canvas:
> --------
> var panel = context.getPanel("myPanel");
> var parentNode = panel.panelNode;
> var canvas = document.createElement('canvas');
> Try:
>
panel.document.createElement('canvas'); 


Note that:

panel.document == panel.panelNode.ownerDocument

The global |document| is XUL

Honza

-- 
You received this message because you are subscribed to the Google
Groups "Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
https://groups.google.com/forum/#!forum/firebug

Reply via email to