fix(iOS): injectedJavaScriptBeforeContentLoaded now runs when messaging is not enabled (#1286)
This commit is contained in:
parent
fda1794035
commit
571fb8df79
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue