whidev
whidev

Reputation: 181

Drawing DOM elements (SVGs as foreign elements) on a canvas doesn't work in Internet Explorer

I have successfully used this technique, to draw user input from DOM elements (such as input and selection fields) on a canvas and make it available as an image.

This works fine in Chrome, Safari and Firefox, but on Internet Explorer 11 , I get the following error:

Essentially, what I am trying to do in this fiddle is to draw the SVG yellow circle image and an arbitrary SVG, provided by me, on the canvas. This seems to work in all major browsers except IE11. Is there anyone else having faced the same problem and knows some workaround?

Upvotes: 8

Views: 1157

Answers (1)

Vasilij Altunin
Vasilij Altunin

Reputation: 822

IE 10 did not support <foreignObject> tag, but you did not need it to draw text on canvas, here i rewrite you fiddle, so now it works in IE - http://jsfiddle.net/skyr9999/5hhpo76h

Upvotes: 1

Related Questions