Supporting and emulatingn HTML5 <canvas> in older IE browsers

1.6k views Asked by At

I found that excanvas and flashcanvas are the common libraries used for supporting canvas features in Internet Explorer( below 9). But both of them doesn't have implemented all the specification features of canvas.

For example the drawImage() function only accepts image as the source. It does not support either canvas or video. Also there is no implementation available for getImageData(),putImageData()

Which is the best and correct JavaScript library for supporting canvas features in IE browsers? Do we get any other library for IE which exactly mimics the native canvas features?

3

There are 3 answers

0
defau1t On

Have you heard about DOM SPRITRES

0
Yukulélé On

FlashCanvas Pro support getImageData() and putImageData(): http://flashcanvas.net/docs/canvas-api

but I suggest you to don't try to use canvas on ie<=9

If you need to works with graphics, you can use http://raphaeljs.com/ , it use SVG for modern browsers an VML for ie 6-8

0
Mikko Ohtamaa On

There is no way to get full canvas support for old IE browsers (IE6 - IE8)

  • Javascript engine performance is not good enough for emulating all native <canvas> operations

  • External plug-ins, like Flash, are limited how they can interact with page elements like <img> or other <canvas>

Solutions

  • Google Chrome Frame provides single click, no admin priviledges needed, plugin which will make older Internet Explorers to use Google Chrome rendering engine when the page requests so. It will turn Internet Explorer Chrome internally and the user doesn't see the difference. The downside is single click plugin install and download time.

  • Don't support old browsers

  • Do not use <canvas> if you need to support old browsers

  • Use <canvas> emulation feature set which works in all browser - this is the most painful solution and I suggest you simply don't try to do it, because sooner or later you'll encounter something that doesn't work in <canvas> emulators