You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have created your canvas element dynamically it will not have the getContext method added to the element. To get it working you need to call initElement on the G_vmlCanvasManager object.
var el = document.createElement('canvas');
G_vmlCanvasManager.initElement(el);
var ctx = el.getContext('2d');
Thats it. Now you can use the HTML5 spec for Canvas as your reference.
when I create a canvas by javascript , it show me 'object unsupport“getContext” ' on IE8
my code like that
var canvas = document.createElement("canvas"); var ctx = canvas.getContext("2d");
The text was updated successfully, but these errors were encountered: