Reputation: 386
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
Upvotes: 4
Views: 3944