We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e1a144 commit f9af6dcCopy full SHA for f9af6dc
src/js/page/ui/svg-output.js
@@ -23,12 +23,10 @@ export default class SvgOutput {
23
}
24
25
setSvg({ text, width, height }) {
26
- // TODO: revisit this
27
- // I would rather use blob urls, but they don't work in Firefox
28
- // All the internal refs break.
29
- // https://bugzilla.mozilla.org/show_bug.cgi?id=1125667
30
const nextLoad = this._nextLoadPromise();
31
- this._svgFrame.src = `data:image/svg+xml,${encodeURIComponent(text)}`;
+ this._svgFrame.src = URL.createObjectURL(
+ new Blob([text], { type: 'image/svg+xml' }),
+ )
32
this._svgFrame.style.width = `${width}px`;
33
this._svgFrame.style.height = `${height}px`;
34
return nextLoad;
0 commit comments