Browse Source

Merge branch 'master' into ci/detox

Jamon Holmgren 5 years ago
parent
commit
486a0d92b2
3 changed files with 8 additions and 2 deletions
  1. 2
    0
      index.d.ts
  2. 1
    1
      ios/RNCWebView.m
  3. 5
    1
      package.json

+ 2
- 0
index.d.ts View File

2
 // eslint-disable-next-line
2
 // eslint-disable-next-line
3
 import { IOSWebViewProps, AndroidWebViewProps } from './lib/WebViewTypes';
3
 import { IOSWebViewProps, AndroidWebViewProps } from './lib/WebViewTypes';
4
 
4
 
5
+export { WebViewMessageEvent, WebViewNavigation } from "./lib/WebViewTypes";
6
+
5
 export type WebViewProps = IOSWebViewProps & AndroidWebViewProps;
7
 export type WebViewProps = IOSWebViewProps & AndroidWebViewProps;
6
 
8
 
7
 declare class WebView extends Component<WebViewProps> {
9
 declare class WebView extends Component<WebViewProps> {

+ 1
- 1
ios/RNCWebView.m View File

438
         [_webView loadRequest:request];
438
         [_webView loadRequest:request];
439
     }
439
     }
440
     else {
440
     else {
441
-        NSURL* readAccessUrl = _allowingReadAccessToURL ? [NSURL URLWithString:_allowingReadAccessToURL] : request.URL;
441
+        NSURL* readAccessUrl = _allowingReadAccessToURL ? [RCTConvert NSURL:_allowingReadAccessToURL] : request.URL;
442
         [_webView loadFileURL:request.URL allowingReadAccessToURL:readAccessUrl];
442
         [_webView loadFileURL:request.URL allowingReadAccessToURL:readAccessUrl];
443
     }
443
     }
444
 }
444
 }

+ 5
- 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": "7.0.3",
11
+  "version": "7.0.5",
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
     "ci": "CI=true && yarn lint && yarn test",
14
     "ci": "CI=true && yarn lint && yarn test",
21
     "prepare": "yarn build",
21
     "prepare": "yarn build",
22
     "test": "yarn jest"
22
     "test": "yarn jest"
23
   },
23
   },
24
+  "rn-docs": {
25
+    "title": "Webview",
26
+    "type": "Component"
27
+  },
24
   "peerDependencies": {
28
   "peerDependencies": {
25
     "react": "^16.0",
29
     "react": "^16.0",
26
     "react-native": ">=0.60 <0.62"
30
     "react-native": ">=0.60 <0.62"