Answer the question
In order to leave comments, you need to log in
Why doesn't firefox draw sprites with canvas SVG?
Cnavas in firefox does not draw SVG if it is a sprite, that is, SVG is requested not like this /icons-sprite.svg
, but like this /icons-sprite.svg#usd-usage
(that is, we say that we need a specific #usd-usage fragment)
let img = new Image();
img.onload = () => {
cx.drawImage(img, 7, h-5, 20, 20);
};
img.src = '/icons-sprite.svg#usd-usage';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question