Closed valyefimov closed 10 months ago
Thank you for all the work you've done.
Could you expand the configuration and add the ability to show a confirmation message before closing the browser?
Something like
@objc func doneDidClick(sender: AnyObject) { let alert = UIAlertController(title: "Confirm Close", message: "Are you sure you want to close web browser?", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "No", style: .cancel, handler: nil)) alert.addAction(UIAlertAction(title: "Yes", style: .default, handler: { _ in var canDismiss = true if let url = self.source?.url { canDismiss = self.delegate?.webViewController?(self, canDismiss: url) ?? true } if canDismiss { self.capBrowserPlugin?.notifyListeners("closeEvent", data: ["url": self.webView?.url?.absoluteString ?? ""]) self.dismiss(animated: true, completion: nil) } })) self.present(alert, animated: true, completion: nil) }
Thanks in advance
This should work for both Android and IOS. As optional for method openWebView. The title, description and button text should be given in params from JS
Thank you for all the work you've done.
Could you expand the configuration and add the ability to show a confirmation message before closing the browser?
Something like
Thanks in advance