Commit Graph

33 Commits

Author SHA1 Message Date
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
wvengen
228703a63b CB-14188: add beforeload event, catching navigation before it happens 2018-10-01 16:41:21 +02:00
stevepodell
42df297724 In file AppBrowser.java: New code within shouldOverrideUrlLoading() to
check for whitelisting custom schemes via a new "AllowedSchemes"
preference configuration item.  Allows custom schemes like
"mycoolapp://" or "wevotetwitterscheme://"

In file inappbrowser.js: Added new "customscheme" channel.
2018-04-05 12:45:02 -07:00
stevepodell
44d9bb0f6a InAppBrowser.java: New method isURLWhileListed to check for whitelisting.
Newtest in shouldOverrideUrlLoading, to allow whitelisted custom schemes
like"mycoolapp://"

inappbrowser.js: Added "customscheme" channel.
2018-04-04 08:22:23 -07:00
Suraj Pindoria
2c547a1a1e CB-13662: remove deprecated platforms 2017-12-12 14:01:38 -08:00
Audrey So
902427525f CB-12895 : added eslint and removed jshint 2017-08-29 15:13:21 -07:00
ekidder3
df8bcaf751 CB-8467
Added support for hiding the web view container.  This maintains the browser
session without closing it.  The browser window can be repeatedly hidden and
shown.

** This has only been tested on android and ios **

amazon/android:
An additional `hide` action was added to `InAppBrowser#execute`.  It is
identical to `show`, except that it calls `dialog.hide()` instead.

blackberry10:
no changes

firefoxos:
Added a `hide` method that is identical to `show`, indicating it is not
supported.

ios:
Added a `hide` method that is identical to `show`, except that it uses
`dismissViewControllerAnimated`.  It checks the value of
`_previousStatusBarStyle`.  If it is `-1`, the method returns with no
action performed.  If it is not, it is set to `-1.`

ubuntu:
Added a `hide` method that sets `CordovaWrapper.global.inappbrowser.visible` to
`false`.

windows:
Added a `hide` method that sets `browserWrap.style.display` to `none`.

wp:
Added a `hide` method that is identical to `show`, except that it sets
`browser.Visibility` to `Visibility.Collapsed` and sets `AppBar.IsVisible` to
`false`.
2016-10-18 10:41:26 -04:00
daserge
ea1253963b CB-10636 Add JSHint for plugins 2016-02-19 15:42:34 +03:00
sgrebnov
2e0dc26eaa CB-10428 Fix syntax error when browserifying inAppBrowser plugin
github close #141
2016-01-26 16:20:42 +03:00
sgrebnov
f326121590 CB-10009 Improve InAppBrowser toolbar look and feel on Windows
github close #129
2016-01-11 14:25:11 +03:00
Jesse MacFadyen
214763c76b Merge branch 'master' of https://github.com/ABB-Austin/cordova-plugin-inappbrowser 2015-11-17 15:07:20 -08:00
sgrebnov
6b99fb96f8 CB-10008 Fix InAppBrowser popup layout on Windows 2015-11-17 11:17:02 +03:00
sgrebnov
fee0d4e2d8 CB-9760 InAppBrowser: fallback to default window.open behavior on Ripple 2015-10-07 12:03:01 +03:00
daserge
368cbcbc41 CB-9378 Fix InAppBrowser not taking whole screen on Windows 2015-07-16 21:35:59 +03:00
aroberson
8175122c03 Invoke webview if using local file 2015-04-13 15:33:03 -05:00
aroberson
11a2acfd7b Fixed zIndex issue on Windows 8, 8.1 where InAppBrowser opens behind default app. 2015-04-10 08:53:48 -05:00
Vladimir Kotikov
461d9e9c4c CB-8635 Improves UX on windows platform
* Adds `fullscreen` option
* Adds ability to apply custom styles to IAB window
2015-04-02 13:32:45 +03:00
daserge
3f80b0b59c CB-7690 InAppBrowser loadstart/loadstop events issues
Subscribing to events before navigating
2014-11-12 22:35:10 -08:00
Edna Morales
8012ae709b CB-7720 check if event is null since OK string from success callback was removed
github: close #68
2014-10-07 11:37:42 -04:00
Jesse MacFadyen
ac0bdee8e6 renamed InAppBrowser back to inappbrowser for case sensitive operating systems 2014-09-18 16:52:40 -07:00
SomaticIT
e5d07f14e8 Update code from remote apache repository 2014-07-11 17:05:24 +02:00
Jesse MacFadyen
bddf86c3ce CB-6402 [WP8] pass empty string instead of null for [optional] windowFeatures string 2014-04-09 12:26:47 -07:00
Jesse MacFadyen
25f306d11e CB-6422 [windows8] use cordova/exec/proxy 2014-04-08 16:29:32 -07:00
Andrew Grieve
d0dd10103c CB-6172 Fix inappbrowser install failure on case-sensitive filesystems. 2014-03-05 12:34:31 -05:00
Andrew Grieve
3f9af4fd88 Remove _alive from InAppBrowser.js since it didn't catch the case where the browser is closed by the user. 2014-01-07 10:52:44 -05:00
Andrew Grieve
8a6bc01814 CB-4858 Convert relative URLs to absolute URLs in JS 2013-10-10 12:21:35 -04:00
Andrew Grieve
ef5eddac9a CB-5021 Make it safe to call close() multiple times 2013-10-09 21:25:24 -04:00
Carlos Santana
12bc5d7d8b [CB-4926] Fixes inappbrowser plugin loading for windows8 2013-09-26 13:53:33 -04:00
purplecabbage
1ce5dca61a [windows8] commandProxy was moved 2013-09-25 16:49:16 +02:00
Anis Kadri
08f66a7cab CB-4889 renaming core references 2013-09-25 16:48:51 +02:00
purplecabbage
e5840eef45 [Windows8] add support for Windows 8 ( limited ) 2013-08-12 13:52:43 -07:00
Steven Gill
8c0c36d5bf updated inappbrowser with latest native + js code 2013-06-13 15:49:11 -07:00
hermwong
63b9760562 added InAppBrowser.js from Cordova-JS 2013-05-16 13:58:48 -07:00