動作
Bug #148
進行中
SC
SC
SVG都在index.html, 有夠難讀
Bug #148:
SVG都在index.html, 有夠難讀
概述
-
把SVG放到另外的資料夾和檔案
-
但是這會造成JS讀不到SVG內容
-
SVG必須改成動態載入, JS也是
-
但是這會造成CROS
Access to XMLHttpRequest at 'file:///D:/ER_note/ext_base.svg' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: chrome, chrome-extension, chrome-untrusted, data, http, https, isolated-app. -
所以必須用localhost的方式, 解法:
Using Python's HTTP Server:
If you have Python installed, you can start a simple HTTP server by navigating to your project's directory in the command line and running:
python -m http.server
This command will start a server at http://localhost:8000/, allowing you to access your files through a browser.
動作