搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

Javascript function "setTimeout" not working inside svg script tag

  • 3 个回答
  • 1 人有此问题
  • 25 次查看
  • 最后回复者为 sebitnt

more options

Hello,

I am trying to execute some script inside an script tag of an svg graphic. All is working fine except for the "setTimeout" function. I am pretty sure that this had worked a few year before. Here is my example code:

https://pastebin.com/mkdMiQ83

I would expect to see an alert window every second. This is working in IE11 but not in the latest Firefox. Is this a bug or a feature? :-) I just wanted to ask here first before creating a bug report. Thank you for your answers in advance!

Hello, I am trying to execute some script inside an script tag of an svg graphic. All is working fine except for the "setTimeout" function. I am pretty sure that this had worked a few year before. Here is my example code: [https://pastebin.com/mkdMiQ83 https://pastebin.com/mkdMiQ83] I would expect to see an alert window every second. This is working in IE11 but not in the latest Firefox. Is this a bug or a feature? :-) I just wanted to ask here first before creating a bug report. Thank you for your answers in advance!

由sebitnt于修改

被采纳的解决方案

It works for me.

定位到答案原位置 👍 0

所有回复 (3)

more options

The code has been removed. Here it is: https://pastebin.com/mkdMiQ83

more options

选择的解决方案

It works for me.

more options

Thank you for trying! I was fiddeling around with this problem for some hours now. After reading your answer and restarting Firefox, the problem is gone. Strange, but it is working now. Thank you!