我試圖在inappbrowser關閉時退出我的應用程序。我試圖通過添加一個eventlistener到瀏覽器,然後從那裏..也許像退出(0)什麼的。 但它不工作,警報永遠不會達到。addEventListener('exit')給PhoneGap中的inappbrowser
有人知道爲什麼嗎? 此外,如果您有關於如何在inappbrowser關閉時退出應用程序的更好的想法,請分享。
我正在使用phonegap。
var ref = null;
ref = window.open('http://google.com', '_self', 'location=no');
ref.addEventListener('exit', function(event) { alert("hello");});