Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use the HTML5 canvas element in IE?

I am trying to use the HTML5 canvas element to draw some arcs and circles - this works perfectly in FF but IE8 does not seem to support it.

Now, there exist Javascript libraries which seem to make IE8 work well with Canvas. An example can be found here.

I have read their entire source but I cannot understand how they are making Canvas work with IE8. Can somebody please throw some light on the method used?

like image 238
KJ Saxena Avatar asked Aug 26 '09 05:08

KJ Saxena


People also ask

Does IE support canvas element?

Note that in Internet Explorer 9, the canvas tag is supported natively!

Does HTML5 work on Internet Explorer?

Internet Explorer browser version 9 and Internet Explorer browser version 11 supports HTML5 semantic elements property.

Is canvas supported in all browsers?

The latest versions of Firefox, Chrome, Internet Explorer and Safari can be used to work with Canvas.

What browsers support canvas HTML?

Browser support The element is supported by the current versions of Mozilla Firefox, Google Chrome, Internet Explorer, Safari, Konqueror, Opera and Microsoft Edge.


2 Answers

The page is using excanvas - a JS library that simulates the canvas element using IE's VML renderer.

Note that in Internet Explorer 9, the canvas tag is supported natively! See MSDN docs for details...

like image 184
Shog9 Avatar answered Sep 19 '22 06:09

Shog9


You can try fxCanvas: https://code.google.com/p/fxcanvas/

It implements almost all Canvas API within flash shim.

like image 34
buzzilo Avatar answered Sep 20 '22 06:09

buzzilo