搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Silent failure when trying to render SVG image with widht/height in percentage

  • 無回覆
  • 1 有這個問題
  • 5 次檢視
more options

Hi,

In the context of an app using Pixi.js to render markers on a map, we have noticed that Firefox is unable to load SVG images from a data URL, as soon as they have a width/height in percentage.

Switching to a px size fixes the problem.

But what bothers me the most, is that this fails seems to be silent, there is no way to catch the error and bubble it up to the developer. So the image just never loads in our code, which makes the issue extremely difficult to figure.

See more information, and a reproduction with Pixi.js there: https://github.com/pixijs/pixi.js/issues/7473

Hi, In the context of an app using Pixi.js to render markers on a map, we have noticed that Firefox is unable to load SVG images from a data URL, as soon as they have a width/height in percentage. Switching to a px size fixes the problem. But what bothers me the most, is that this fails seems to be silent, there is no way to catch the error and bubble it up to the developer. So the image just never loads in our code, which makes the issue extremely difficult to figure. See more information, and a reproduction with Pixi.js there: https://github.com/pixijs/pixi.js/issues/7473