Safari Extension from Chrome Extension

Hi, I converted my chrome extension to a Safari extension and I do not know how to resolve one issue. After user clicks a button in a popup, I am doing this

Code Block
document.getElementById("save").addEventListener("click", e => {
chrome.runtime.sendMessage({message: cur_link}, function (response) {
window.close()
});
})

But window.close() is causing the url field of a webpage to be clicked on Safari. Please, let me know how to close the popup correctly.


Replies

Are you trying to close the popover from your toolbar item? Or a popup created by webpage in a tab?