You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ios): Support custom scheme event for iOS (#1112)
- Add support for the `AllowedSchemes` preference and `customscheme` event for iOS like on Android.
- Token from PR #274 which was implementing it in `UIWebView`
- JIRA-Ticket: https://issues.apache.org/jira/browse/CB-14187
When the opened page navigates to the link `app://hide`, the browser is hidden.
342
+
312
343
#### Download event Example
313
344
314
345
Whenever the InAppBrowser receives or locates to a url which leads in downloading a file, the callback assigned to the "download" event is called. The parameter passed to this callback is an object with the the following properties
@@ -340,7 +371,7 @@ function downloadListener(params){
340
371
341
372
### InAppBrowserEvent Properties
342
373
343
-
-__type__: the eventname, either `loadstart`, `loadstop`, `loaderror`, `message` or `exit`. _(String)_
374
+
-__type__: the eventname, either `loadstart`, `loadstop`, `loaderror`, `message`, `customscheme` or `exit`. _(String)_
344
375
-__url__: the URL that was loaded. _(String)_
345
376
-__code__: the error code, only in the case of `loaderror`. _(Number)_
346
377
-__message__: the error message, only in the case of `loaderror`. _(String)_
@@ -354,7 +385,7 @@ function downloadListener(params){
354
385
355
386
### Browser Quirks
356
387
357
-
`loadstart`, `loaderror`, `message` events are not fired.
388
+
`loadstart`, `loaderror`, `message`, `customscheme` events are not fired.
358
389
359
390
### Quick Example
360
391
@@ -376,6 +407,7 @@ function downloadListener(params){
376
407
-__loaderror__: event fires when the `InAppBrowser` encounters an error loading a URL.
377
408
-__exit__: event fires when the `InAppBrowser` window is closed.
378
409
-__message__: event fires when the `InAppBrowser` receives a message posted from the page loaded inside the `InAppBrowser` Webview.
410
+
-__customscheme__: event fires when a link is followed that matches `AllowedSchemes`.
379
411
-__download__: _(Android only)_ event fires when the `InAppBrowser` loads a URL that leads in downloading of a file.
380
412
381
413
-__callback__: the function to execute when the event fires.
'Expected result: consistently open browsers with with the appropriate option: hardwareback=defaults to yes then hardwareback=no then hardwareback=defaults to yes. By default hardwareback is yes so pressing back button should navigate backwards in history then close InAppBrowser';
527
528
529
+
constcustomscheme_tests=
530
+
'<h1>Customscheme</h1>'+
531
+
'<p/> <div id="openCustomscheme"></div>'+
532
+
'Expected result: open an alert dialog with the text "Results verified". Works only on Android and iOS.';
533
+
528
534
contentEl.innerHTML=
529
535
info_div+
530
536
platform_info+
@@ -539,7 +545,8 @@ exports.defineManualTests = function (contentEl, createActionButton) {
0 commit comments