diff --git a/README.md b/README.md index a16f6b9..4aea983 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,13 @@ function openUrl(url, readerMode) { }, function(msg) { alert("KO: " + msg); - }) + }); + + SafariViewController.addEventListener("exit", function onExit() { + console.log("Browser was dismissed"); + + SafariViewController.removeEventListener("exit", onExit); + }); } else { // potentially powered by InAppBrowser because that (currently) clobbers window.open window.open(url, '_blank', 'location=yes'); diff --git a/demo/index.html b/demo/index.html index fd16bae..28e49e1 100644 --- a/demo/index.html +++ b/demo/index.html @@ -24,6 +24,10 @@
Events
+
+
@@ -52,6 +56,25 @@