mirror of
https://github.com/status-im/react-native-webview.git
synced 2026-08-31 11:41:08 +00:00
fix(iOS): injectedJavaScriptBeforeContentLoaded now runs when messaging is not enabled (#1286)
This commit is contained in:
+4
-4
@@ -1245,14 +1245,14 @@ static NSDictionary* customCertificatesForHost;
|
||||
name:MessageHandlerName];
|
||||
[wkWebViewConfig.userContentController addUserScript:self.postMessageScript];
|
||||
}
|
||||
// FIXME: For a separate (minor) PR: these two shouldn't be gated by messagingEnabled; just keeping consistency with previous behaviour.
|
||||
if (self.atStartScript) {
|
||||
[wkWebViewConfig.userContentController addUserScript:self.atStartScript];
|
||||
}
|
||||
if (self.atEndScript) {
|
||||
[wkWebViewConfig.userContentController addUserScript:self.atEndScript];
|
||||
}
|
||||
}
|
||||
// Whether or not messaging is enabled, add the startup script if it exists.
|
||||
if (self.atStartScript) {
|
||||
[wkWebViewConfig.userContentController addUserScript:self.atStartScript];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSURLRequest *)requestForSource:(id)json {
|
||||
|
||||
Reference in New Issue
Block a user