Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
2d80402d9f
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1
    1
      package.json

+ 1
- 1
package.json Dosyayı Görüntüle

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