Wednesday 6 November 2019

Chrome extension options page 'addEventListener' bug

I'm trying to make an options page for my chrome extension. I've followed this tutorial exactly: https://developer.chrome.com/extensions/options.html



Now it doesn't do anything when pressing the 'save' button. I inspected the code and it returns Uncaught TypeError: Cannot call method 'addEventListener' of null
at the line: document.querySelector('#save').addEventListener('click', save_options);

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...