I am writing a web extension for Mozilla Firefox and would like to execute a javascript in my popup.
This is my code
manifest.json
{
"manifest_version": 2,
"name": "Test",
"version": "0.0.1",
"description": "Test",
"icons": {
"48": "icon.svg"
},
"browser_action" : {
"default_popup": "popup.html"
}
}
popup.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test</title>
</head>
<body>
this message is correctly shown in my popup
<script src="popup.js"></script>
</body>
</html>
popup.js
console.log('this line is never executed');
I open the browser console (CTRL+SHIFT+J) which should theoretically log my web extension console output, but I get nothing.
Edit: I'm using Mozilla Firefox Developer Edition 72.0b3 (64-bit) on Arch Linux
Edit: I also tried launching my extension using web-ext (which launches a browser instance with a new profile) with the same result