<!DOCTYPE html> <html> <body> <input type="button" id="button1" value="first button"> <input type="button" id="button2" value="second button"> <script> console.log("do anything!!"); </script> </body> </html>
I can't see the logger statement anywhere. I can't seem to get anything to run. Is this how popups are supposed to work? The docs make no mention of these popups being static HTML only.
Quoting from the Content Security Policy page:
Therefore, you'll need to put your code inside another file and import it, like this:
Secondly, the code you run into the popup is logged in its own console, so you have to right-click on your extension's icon, and hit "Inspect popup". Then, a developer tools window will appear, and you'll be able to browse to the "Console" tab and see the log. Alternatively, you can open the popup and right click anywhere inside it, then choose "Inspect element", like on any normal page.
©2020 All rights reserved.