getSVGDocument returns null in FireFox and Chrome

后端 未结 2 898
被撕碎了的回忆
被撕碎了的回忆 2020-12-10 23:02

Is getSVGDocument broken? Obsolete?

Because when I \"run\" the following:




  

        
2条回答
  •  时光说笑
    2020-12-10 23:15

    Found how to work around this, it's a security related issue.

    Chrome

    Close all running chrome instances first. Then start Chrome executable with a command line flag:

    chrome --allow-file-access-from-files

    On Windows, the easiest is probably to create a special shortcut which has added flag (right-click on shortcut -> properties -> target).

    Firefox

    Go to about:config Find security.fileuri.strict_origin_policy parameter Set it to false

    Got it there: https://github.com/mrdoob/three.js/wiki/How-to-run-things-locally

提交回复
热议问题