Currently I am working on a chrome extension and with the popup.html I cannot get the popup.js to work
popup.html
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
</head>
<body style="width: 15rem; height: 15rem">
<div class="container-fluid" style="padding: 10px">
<input id="url" />
<button type="button" id="newDetails">Submit</button>
</div>
<script src="./popup.js"></script>
</body>
</html>
popup.js
console.log("Hello")
let btn = document.getElementById("newDetails");
btn.onclick = function () {
console.log("Clicked!");
};
I have already looked at plenty of questions/answers (e.g. this,this,this) but none have been able to fix my issue.
Thank you in advance!