3

I only use following anchor in chrome extension popup.html, when I click anchor, I get error

<a onclick="new Audio('https://dictionary.blob.core.chinacloudapi.cn/media/audio/tom/8a/e7/8AE76DF495E14441114FD06473DA2336.mp3').play();return false"><img src="img/voice.png" alt="voice"></a>

the full error output is:

Refused to execute inline event handler because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-...')
hucmarcot
  • 311
  • 1
  • 2
  • 9

0 Answers0