|
@@ -194,10 +194,12 @@ class WebView extends React.Component<WebViewSharedProps, State> {
|
194
|
194
|
);
|
195
|
195
|
}
|
196
|
196
|
|
|
197
|
+ getCommands = () => UIManager.getViewManagerConfig('RNCWebView').Commands;
|
|
198
|
+
|
197
|
199
|
goForward = () => {
|
198
|
200
|
UIManager.dispatchViewManagerCommand(
|
199
|
201
|
this.getWebViewHandle(),
|
200
|
|
- UIManager.RNCWebView.Commands.goForward,
|
|
202
|
+ this.getCommands().goForward,
|
201
|
203
|
null,
|
202
|
204
|
);
|
203
|
205
|
};
|
|
@@ -205,7 +207,7 @@ class WebView extends React.Component<WebViewSharedProps, State> {
|
205
|
207
|
goBack = () => {
|
206
|
208
|
UIManager.dispatchViewManagerCommand(
|
207
|
209
|
this.getWebViewHandle(),
|
208
|
|
- UIManager.RNCWebView.Commands.goBack,
|
|
210
|
+ this.getCommands().goBack,
|
209
|
211
|
null,
|
210
|
212
|
);
|
211
|
213
|
};
|
|
@@ -216,7 +218,7 @@ class WebView extends React.Component<WebViewSharedProps, State> {
|
216
|
218
|
});
|
217
|
219
|
UIManager.dispatchViewManagerCommand(
|
218
|
220
|
this.getWebViewHandle(),
|
219
|
|
- UIManager.RNCWebView.Commands.reload,
|
|
221
|
+ this.getCommands().reload,
|
220
|
222
|
null,
|
221
|
223
|
);
|
222
|
224
|
};
|
|
@@ -224,7 +226,7 @@ class WebView extends React.Component<WebViewSharedProps, State> {
|
224
|
226
|
stopLoading = () => {
|
225
|
227
|
UIManager.dispatchViewManagerCommand(
|
226
|
228
|
this.getWebViewHandle(),
|
227
|
|
- UIManager.RNCWebView.Commands.stopLoading,
|
|
229
|
+ this.getCommands().stopLoading,
|
228
|
230
|
null,
|
229
|
231
|
);
|
230
|
232
|
};
|
|
@@ -232,7 +234,7 @@ class WebView extends React.Component<WebViewSharedProps, State> {
|
232
|
234
|
postMessage = (data: string) => {
|
233
|
235
|
UIManager.dispatchViewManagerCommand(
|
234
|
236
|
this.getWebViewHandle(),
|
235
|
|
- UIManager.RNCWebView.Commands.postMessage,
|
|
237
|
+ this.getCommands().postMessage,
|
236
|
238
|
[String(data)],
|
237
|
239
|
);
|
238
|
240
|
};
|
|
@@ -246,7 +248,7 @@ class WebView extends React.Component<WebViewSharedProps, State> {
|
246
|
248
|
injectJavaScript = (data: string) => {
|
247
|
249
|
UIManager.dispatchViewManagerCommand(
|
248
|
250
|
this.getWebViewHandle(),
|
249
|
|
- UIManager.RNCWebView.Commands.injectJavaScript,
|
|
251
|
+ this.getCommands().injectJavaScript,
|
250
|
252
|
[data],
|
251
|
253
|
);
|
252
|
254
|
};
|
|
@@ -311,7 +313,7 @@ class WebView extends React.Component<WebViewSharedProps, State> {
|
311
|
313
|
if (shouldStart) {
|
312
|
314
|
UIManager.dispatchViewManagerCommand(
|
313
|
315
|
this.getWebViewHandle(),
|
314
|
|
- UIManager.RNCWebView.Commands.loadUrl,
|
|
316
|
+ this.getCommands().loadUrl,
|
315
|
317
|
[String(url)],
|
316
|
318
|
);
|
317
|
319
|
}
|