So I\'m testing out creating a chrome extension. I understand that with Manifest v2 you can\'t have javascript in popup.html. So, I\'ve moved the javascript to a separate fi
Just remove window.onload:
window.onload
function myAlert(){ alert('hello world'); } document.addEventListener('DOMContentLoaded', function () { document.getElementById('alertButton').addEventListener('click', myAlert); });