Browse Source

chore(release): 5.0.0 [skip ci]

# [5.0.0](https://github.com/react-native-community/react-native-webview/compare/v4.1.0...v5.0.0) (2019-02-01)

### Features

* **Android/iOS postMessage:** refactoring the old postMessage implementation ([#303](https://github.com/react-native-community/react-native-webview/issues/303)) ([f3bdab5](https://github.com/react-native-community/react-native-webview/commit/f3bdab5)), closes [#29](https://github.com/react-native-community/react-native-webview/issues/29) [#272](https://github.com/react-native-community/react-native-webview/issues/272) [#221](https://github.com/react-native-community/react-native-webview/issues/221) [#105](https://github.com/react-native-community/react-native-webview/issues/105) [#66](https://github.com/react-native-community/react-native-webview/issues/66)

### BREAKING CHANGES

* **Android/iOS postMessage:** Communication from webview to react-native has been completely rewritten. React-native-webview will not use or override window.postMessage anymore. Reasons behind these changes can be found throughout so many issues that it made sense to go that way.

Instead of using window.postMessage(data, *), please now use window.ReactNativeWebView.postMessage(data).

Side note: if you wish to keep compatibility with the old version when you upgrade, you can use the injectedJavascript prop to do that:

const injectedJavascript = `(function() {
  window.postMessage = function(data) {
    window.ReactNativeWebView.postMessage(data);
  };
})()`;

Huge thanks to @jordansexton and @KoenLav!
semantic-release-bot 5 years ago
parent
commit
2d80402d9f
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      package.json

+ 1
- 1
package.json View File

8
     "Thibault Malbranche <malbranche.thibault@gmail.com>"
8
     "Thibault Malbranche <malbranche.thibault@gmail.com>"
9
   ],
9
   ],
10
   "license": "MIT",
10
   "license": "MIT",
11
-  "version": "4.1.0",
11
+  "version": "5.0.0",
12
   "homepage": "https://github.com/react-native-community/react-native-webview#readme",
12
   "homepage": "https://github.com/react-native-community/react-native-webview#readme",
13
   "scripts": {
13
   "scripts": {
14
     "test:ios:flow": "flow check",
14
     "test:ios:flow": "flow check",