I am building chrome extensions using javascript. I have some struggles on addEventListeners. Kindly check the below code
var SpellCheck = document.getElementById('spellCheck')
SpellCheck.addEventListener('click', async () => {
let [tab] = await chrome.tabs.query({
active: true,
currentWindow: true
});
var w = 600;
var h = 550;
var left = (screen.width / 2) - (w / 2);
var top = (screen.height / 2) - (h / 2);
chrome.windows.create({ 'url': 'onboarding.html', 'type': 'popup', 'width': w, 'height': h, 'left': left, 'top': top }, function (window) { });
});
but I got the below error please help me to reach out this issue.
