Commit Graph

84 Commits

Author SHA1 Message Date
jcesarmobile
4b3c0f126d
fix!: remove deprecated platforms windows & osx (#1030) 2023-11-04 19:51:11 +01:00
Norman Breau
b18b9794a8
feat(android): Download event (#1019)
* feat(android): Added download event

* android typos, whitespaces and whiteline corrected

* Update README.md

* fix: removed added whitespace trail

---------

Co-authored-by: Shaikh Amaan FM <thisisamaan.s@gmail.com>
Co-authored-by: Shaikh Amaan FM <53618794+shaikh-amaan-fm@users.noreply.github.com>
2023-09-15 00:23:22 -03:00
jcesarmobile
178f2d3e59
chore: use https urls in tests and README (#1016) 2023-09-07 23:36:52 +02:00
DAnn2012
8ee1d38821
fix(docs): missing xml indicator in code block (#977) 2022-09-25 18:04:14 -03:00
エリス
0f468c7393
ci: add action-badge (#907) 2021-09-25 01:03:30 +09:00
エリス
2043109c16
ci: remove travis & appveyor (#906) 2021-09-25 00:07:33 +09:00
Niklas Merz
6b920849cc
feat(ios): add InAppBrowserStatusBarStyle 'darkcontent' configuration option (#828)
Co-authored-by: Tim Brust <github@timbrust.de>
2021-02-09 08:24:56 +01:00
Niklas Merz
46c080f59a
(ios): allow to set "preferredContentMode" (#688)
PreferredContentMode can now be set with preference config. Since iPadOS came out iPads get a desktop Safari useragent by default.

see #687 

Co-authored-by: Tim Brust <github@timbrust.de>
2020-09-20 01:48:32 +02:00
Moses Berra
edd7250c83 add documentation for InAppBrowserStatusBarStyle preference 2020-08-18 13:22:48 -05:00
Niklas Merz
074d4d03ea
(all platforms): remove "window.open" overwrite (#600)
Closes #599
2020-04-14 15:25:54 +02:00
Tim Brust
df4615dea4
docs: replaces outdated transition and presentation style links (#662) 2020-04-07 13:20:36 +00:00
Mosab A
0e5f05c938
[android] Correcting the documentation regarding lefttoright opt… (#648) 2020-03-25 17:18:41 +00:00
PDLMobileApps
e78ffe7fc2
(android) Added option to turn on/off fullscreen mode in Android (#634)
* (android) Added option to turn on/off fullscreen mode in Android

* (android) Reverted version changes as requested

* (android) Changing default option value to enabled as per request

Co-authored-by: Alessandro Basso <Alessandro.Basso@PeapodDigitalLabs.com>
2020-03-24 13:24:14 +00:00
jcesarmobile
6c55e6172c
breaking(ios): remove UIWebView (#635) 2020-03-05 15:51:31 +01:00
mosababubakr
9a15737577 Update missing closed brace to the insert.CSS (#568) 2019-11-04 15:23:44 +00:00
mosababubakr
1e16c50b1a
Update missing closed brace to the insert.CSS 2019-11-03 16:56:59 +02:00
Jesse MacFadyen
2500b08946
Merge pull request #383 from cvanem/master
Example documentation - Fix messageCallBack and beforeloadCallBack function names
2019-03-05 23:55:34 -08:00
Steinar Ágúst
f861655382 CB-13969 fixing README to be correct for lefttoright option 2019-02-28 15:17:24 +00:00
Steinar Ágúst
4adf4c7230 CB-13969 updating README.MD to better explain lefttoright parameter option, reverting unneccesary indent changes on inappbrowser.css 2019-02-28 12:28:58 +00:00
Steinar Ágúst
74ccef1226 Merge remote-tracking branch 'upstream/master' 2019-02-28 11:43:34 +00:00
Jan Piotrowski
92243cdcc2
Add headline to window.open documentation (#406) 2019-02-22 18:27:30 +01:00
cvanem
a890e606eb
Example documentation - Fix callBack function name 2018-12-25 15:01:43 -07:00
Dave Alden
632a395b3d GH-359: Fix beforeload to work with POST requests (#367)
### Platforms affected
iOS and Android


### What does this PR do?
Fixes the behaviour of `beforeload` to resolve the problem with POST requests outlined in #359.

The `beforeload` parameter has been changed from taking only a boolean (`yes` or not defined) to a discrete string with possible values of `get`, `post`, or `yes` which correspond to request types of GET, POST or GET&POST respectively. The `README.md` has been updated to reflect this.

Note that use of `beforeload` to intercept POST requests is currently not supported on Android or iOS, so if `beforeload=yes` is specified and a POST request is detected as the HTTP request method, `beforeload` behaviour will not be applied. If `beforeload=post` is specified, a `loaderror` event will be dispatched which states that POST requests are not yet supported.

#### Notes for Android

The `shouldOverrideUrlLoading()` override method has been updated to support the [new method interface added in API 24 / Android 7][1] which receives the `WebResourceRequest` instead of just the `String url`, enabling the HTTP method of the request to be determined. The [deprecated method interface][2] has also been preserved for API <=23, but in this case the HTTP method cannot be determined so is passed as null.

Also note that due to a [Chromium bug](https://bugs.chromium.org/p/chromium/issues/detail?id=155250),  `shouldOverrideUrlLoading()` is currently not called for POST requests. It's possible this may be resolved in a future Chromium version in the Android System Webview (given that this is now self-updating and independent of Android version since Android 5.0) - in prospective anticipation of this, code to handle POST requests has been added to `shouldOverrideUrlLoading()`.

However, it seems more likely that this won't be resolved any time soon given that [a Chromium dev said](https://bugs.chromium.org/p/chromium/issues/detail?id=155250#c39):

 > We're looking at implementing a better way to handle request interception in a future OS version. There's no way to just "fix" this, the API doesn't accommodate this usage at all. This will not be something you can use any time soon.

Therefore if we want to go ahead and use `beforeload` to intercept request types other than GET, it's likely we'll instead need to use the `shouldInterceptRequest()` method override. As with `shouldOverrideUrlLoading()`, there are a two variants: the [new method interface][3] added in API 21 / Android 5.0 which  which receives the `WebResourceRequest` object and the [deprecated one][4] which receives only `String url`. If we want to determine the HTTP request method, we'll need to use the new implementation. This has been empirically tested and *is* called for POST requests so would allow the possibility to intercept, delay, modify and send the POST request and its data via `beforeload`.
Both `shouldInterceptRequest()` method interfaces have been exposed in the Android implentation for potential future use but they currently do nothing other than return the unadulterated request object.

### What testing has been done on this change?
Manual testing of POST and GET requests on both platforms using a test app container:
https://github.com/dpa99c/cordova-plugin-inappbrowser-test

[1]: https://developer.android.com/reference/android/webkit/WebViewClient.html#shouldOverrideUrlLoading(android.webkit.WebView,%20android.webkit.WebResourceRequest)
[2]: https://developer.android.com/reference/android/webkit/WebViewClient.html#shouldOverrideUrlLoading(android.webkit.WebView,%20java.lang.String)
[3]: https://developer.android.com/reference/android/webkit/WebViewClient.html#shouldInterceptRequest(android.webkit.WebView,%20android.webkit.WebResourceRequest)
[4]: https://developer.android.com/reference/android/webkit/WebViewClient.html#shouldInterceptRequest(android.webkit.WebView,%20java.lang.String)
2018-12-20 20:31:14 +01:00
Dave Alden
c54d10052a (iOS & Android) Add postMessage API support (#362)
<!--
Please make sure the checklist boxes are all checked before submitting the PR. The checklist
is intended as a quick reference, for complete details please see our Contributor Guidelines:

http://cordova.apache.org/contribute/contribute_guidelines.html

Thanks!
-->

### Platforms affected
Android
iOS (both UIWebView & WKWebView implementations)

### What does this PR do?
Adds support for [postMessage API](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage) enabling pages loaded into the InappBrowser to post messages back to the parent Webview of the Cordova app.

For example, sending event messages associated with UI interactions such as button clicks from the wrapped page back to the parent app Webview.

### What testing has been done on this change?
Automated tests have been extended to cover the `message` event.

### Checklist
- [x ] Commit message follows the format: "GH-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
- [ x] Added automated test coverage as appropriate for this change.
2018-12-13 17:21:45 +01:00
Dave Alden
3b82c160d9 Fix crashes when using WKWebView implementation on iOS 9. (#337)
Fixes #323. Fixes #324.
2018-11-20 17:12:29 +01:00
Jan Piotrowski
3eadde65ab
remove unwanted information in README table (#308)
remove unwanted information in README table
2018-11-06 19:53:54 +01:00
Dave Alden
19c6dfe197 Merge branch 'master' into CB-7179 2018-10-09 11:15:23 +01:00
Jan Piotrowski
d9cafcdb14
remove JIRA link 2018-10-04 01:16:19 +02:00
Jan Piotrowski
8165232a5a
experimental commit 2018-10-03 16:55:12 +02:00
wvengen
228703a63b CB-14188: add beforeload event, catching navigation before it happens 2018-10-01 16:41:21 +02:00
Dave Alden
dc7fa34bbe CB-7179 (iOS): Add support to optionally use WKWebView for iOS 2018-09-30 10:05:46 +01:00
Christopher J. Brody
07d9a9939b Skip Android 6.0 on Travis CI (for now) 2018-07-31 19:18:29 -04:00
Christopher J. Brody
81f1437b6d README.md add AppVeyor CI & Travis CI details 2018-07-31 19:05:28 -04:00
Steve Gill
974ca3309a
Merge pull request #254 from NiklasMerz/loading-spinner
CB-13659 (iOS) Add hidespinner option
2018-04-12 12:04:06 -07:00
Bentley O'Kane-Chase
65a825a193 Add customisation of the navigation buttons for iOS 2018-03-21 21:50:25 +10:00
Landsbankinn
b06ad8ed97 CB-13696 fixing for PR 2018-03-13 11:48:15 +00:00
Landsbankinn
313e0ae6f9 Merge remote-tracking branch 'upstream/master' 2018-03-06 16:58:35 +00:00
Dave Alden
b73ba93884 CB-13791: Add Android support for a footer close button 2018-01-17 20:13:19 +00:00
Joe Bowser
c80c338e51
Merge pull request #246 from landsbankinn/CB-13409
Cb 13409 - Add more configurable options for toolbar in android and ios
2018-01-17 11:04:07 -08:00
Niklas Merz
695e1b0f02
CB-13659 (iOS) Add hidespinner option
Signed-off-by: Niklas Merz <NiklasMerz@gmx.net>
2017-12-13 22:22:57 +01:00
Suraj Pindoria
2c547a1a1e CB-13662: remove deprecated platforms 2017-12-12 14:01:38 -08:00
Landsbankinn
4af420c592 CB-13409: change hidetoolbarnavigationbuttons to hidenavigationbuttons in iso 2017-10-09 16:17:52 +00:00
Landsbankinn
e691212c96 CB-13409: Android works well now, all changes are now documented 2017-10-09 16:17:44 +00:00
Landsbankinn
0c6189e1a2 change hidetoolbarnavigationbuttons to hidenavigationbuttons in iso 2017-10-06 15:35:28 +00:00
Landsbankinn
d940b596b6 Android works well now, all changes are now documented 2017-10-06 14:45:12 +00:00
Jez McKean
aee699a0e5 minor grammar fix
This closes #241
2017-09-27 09:46:47 -07:00
Jan Piotrowski
7611645469 CB-12975 (docs) Resort and reword cordova.InAppBrowser.open options lists
for better developer experience
2017-08-01 11:55:59 -07:00
Alexander Sorokin
72ac4d7eca CB-13028 (CI) Browser builds on Travis and AppVeyor, Fixes tests on browser and browser implementation 2017-07-27 15:55:11 +03:00
Julio César
6e058624d6 CB-13035 fix Create issue Link
This closes #228
2017-07-23 18:59:52 +02:00
Alexander Sorokin
aa82a5d6c8 CB-12991: (CI) Updated CI badges 2017-07-07 10:54:24 +03:00