ExplorerCanvas Copyright 2006 Google Inc. ------------------------------------------------------------------------------- DESCRIPTION Firefox, Safari and Opera 9 support the canvas tag to allow 2D command-based drawing operations. ExplorerCanvas brings the same functionality to Internet Explorer; web developers only need to include a single script tag in their existing canvas webpages to enable this support. ------------------------------------------------------------------------------- INSTALLATION Include the ExplorerCanvas tag in the same directory as your HTML files, and add the following code to your page, preferably in the <head> tag. <!--[if lte IE 8]><script type="text/javascript" src="excanvas.js"></script><![endif]--> If you run into trouble, please look at the included example code to see how to best implement this
Canvas for IE8 and older
ExplorerCanvas Copyright 2006 Google Inc. ------------------------------------------------------------------------------- DESCRIPTION Firefox, Safari and Opera 9 support the canvas tag to allow 2D command-based drawing operations. ExplorCategory: JavaScript / Miscellaneous |
Watchers: 42 |
Star: 614 |
Fork: 314 |
Last update: Dec 8, 2023 |
Closes #1
I have removed the IE_VERSION variable due to problems explained in issue arv#13.
It appears that the script fails to load when using Trident/IE web browser control. The errors occurs at https://github.com/arv/ExplorerCanvas/blob/aa989ea9d9bac748638f7c66b0fc88e619715da6/excanvas.js#L51
In Trident, MSIE is not defined in the user agent and the return value for the match function is null. I'm not sure the IE_VERSION variable is used anywhere and maybe it can be removed.
Why get the Canvas object is [object DispHTMLUnknownElement] type, the following code:
var els = doc.getElementsByTagName('canvas');
for (var i = 0; i < els.length; i++) {
this.initElement(els[i]); //[object DispHTMLUnknownElement]
}
}
initElement: function(el) {
//...
el.innerHTML = '';//throws an exception under IE8
//...
}
In the right circumstances, it should be [ object DispHTMLGenericElement ].
Why is this so?TKS
Target appropriate IE versions
I can not make it work with coolclock.js: http://fabbryzz.it/anteprima_template_dres/(6)/utilities.html Can you help me?
i want to use make a image and append in my dom, but not work in IE8. what's the problem? ... var image = canvas.toDataURL("image/png"); var img = document.createElement("img"); img.src = image; img.width = canvas.width; img.height = canvas.height; $("#id").append(img); ...
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");
I use this excanvas in IE8 for Chart.js ployfill, but the text flicker and sometimes display when i moverover the canvas as below.
Why?
How to fix it?
In your canvas polyfill , it only support canvas drawImage from image, but i want to drawImage by passing the source canvas directly ? How to solve it ?
It would be nice to add a tag with the version to fix in the bower.json file.
Hi!
Just wanted to know if it could be possible to add a bower.json
file, then adding ignore
rules to it.
This way, it will be possible to fetch only the JS file without getting tests, HTML files, etc.
What do you think @arv?