简体   繁体   中英

Can I use JavaScript in an extension to quit chrome?

I'm trying to figure out a way to actually quit Google Chrome using JavaScript, it's for an extension i'm building.

All I could find is a way to use Chrome's API to close Chrome's windows/tabs.

Yep, using the remove() function when you have the windows permission, in the format:

chrome.windows.remove(windowId, callback)

Check out the API documentation for more details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM