Refused to execute inline event handler in chrome extension


problem : chrome extension

Refused to execute inline event handler because it violates the following

Content Security Policy directive: "script-src 'self' blob: filesystem:


link for some study related this:

if any problem like as cannot-read-property-addeventlistener-of-null generated then use this code :

I think the easiest approach would be to just check that el is not null before adding an event listener:

var el = document.getElementById('yourbuttonid');


el.addEventListener('click', yourfunction, false);


Channel:  rahul shukla
rubel rana 

Can you give me link of the stackoverflow solution you showed in your video?