I am trying to close a chrome extension on-click of a button. The window is the only window open for this app. I thought the below would work but receiving the following console errors.
I am referencing jQuery in my HTML. All I want it to click a button and close my chrome app.
Uncaught TypeError: Cannot read property 'current' of undefined
$(document).ready(function() {
$("#close").click(function() {
chrome.app.window.current().close();
});
});
The duplicate in no way explains my issue
Try this from the window:
window.close();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With