I'm needing to use functions from js file which i keep in another server on ext, but when i embed in style
<script src="http://localhost:3000/weather.js">
Then it gives error:
Refused to load the script 'http://localhost:3000/weather.js' because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
So is there any solution for me? I simply want when I click a button to execute the method located in the weather.js file:
const main = () =>{
console.log("Success!!!")
}
tets = document.querySelector(".btn-test")
test.onclick = () =>{
main()
}