Richa
Richa

Reputation: 4270

Is there a way to use Canvas in IE7 or IE8?

Is there any workaround to use "Canvas" tag in IE7 and IE8 ? Pls let me know.

<input type="text" id="textSign" value="Sign" />
<input type="button" onclick="javascript:return changeSign();" value="changeSign" />
<canvas id="e" width="150" height="100"></canvas>
<script type="text/javascript">
var textSign = document.getElementById("textSign").value;
      function changeSign() {
             textSign = document.getElementById("textSign").value;
                    var canvas = document.getElementById("e");
                    var context = canvas.getContext("2d");
                    context.fillStyle = "#4c4c4c";
                    context.font = "30px Giddyup Std";
                    context.fillText (textSign , 20, 50);
                }
            </script>

Upvotes: 6

Views: 13582

Answers (3)

user1377849
user1377849

Reputation:

No. Canvas element is supported only in IE9.

Upvotes: -1

Adriano Repetti
Adriano Repetti

Reputation: 67148

Yes, there is a project to simulate the canvas API on older versions of IE (7 and 8).

You can find it here, simply include the JavaScript file and go on as canvas was supported.

Please note that is another layer of JavaScript code on the top of IE (and it's not famous to be very fast to parse JavaScript...)

Upvotes: 8

Denys S&#233;guret
Denys S&#233;guret

Reputation: 382504

Yes there is : https://developers.google.com/chrome/chrome-frame/

But as with any modern web technology, you'll have to make extensive tests while developping. And depending on your deployement location, you may be forbidden to use that (sysadmins still imposing IE7 may have strange requirements).

Upvotes: 1

Related Questions