react-native-webview/package.json
semantic-release-bot 2d80402d9f 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!
2019-02-01 17:38:54 +00:00

42 lines
1.3 KiB
JSON

{
"name": "react-native-webview",
"description": "React Native WebView component for iOS, Android, and Windows 10 (coming soon)",
"main": "index.js",
"typings": "typings/index.d.ts",
"author": "Jamon Holmgren <jamon@infinite.red>",
"contributors": [
"Thibault Malbranche <malbranche.thibault@gmail.com>"
],
"license": "MIT",
"version": "5.0.0",
"homepage": "https://github.com/react-native-community/react-native-webview#readme",
"scripts": {
"test:ios:flow": "flow check",
"test:android:flow": "flow check --flowconfig-name .flowconfig.android",
"ci:publish": "yarn semantic-release",
"ci:test": "yarn ci:test:flow",
"ci:test:flow": "yarn test:ios:flow && yarn test:android:flow",
"semantic-release": "semantic-release"
},
"peerDependencies": {
"react": "^16.0",
"react-native": "^0.57"
},
"dependencies": {
"escape-string-regexp": "^1.0.5",
"fbjs": "^0.8.17"
},
"devDependencies": {
"@semantic-release/git": "7.0.5",
"@types/react": "^16.4.18",
"@types/react-native": "^0.57.6",
"flow-bin": "^0.80.0",
"react-native": "^0.57",
"semantic-release": "15.10.3"
},
"repository": {
"type": "git",
"url": "https://github.com/react-native-community/react-native-webview.git"
}
}