L
L
Logico2014-02-02 11:40:22
Browser extensions
Logico, 2014-02-02 11:40:22

Chrome extensions. How to track application close event?

The only thing I found about this is tracking the closing of the connection, but I can not get it to work properly. The code is executed immediately after the extension is opened, not when it is closed.

var port = chrome.extension.connect();
    port.onDisconnect.addListener(function(){
        alert('Closing extenstion');
    });

The .unload() event in jquery doesn't help either.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Fedorov, 2014-02-02
@JekFdrv

chrome.app.window.current().onClosedtyts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question