|
@@ -1245,14 +1245,14 @@ static NSDictionary* customCertificatesForHost;
|
1245
|
1245
|
name:MessageHandlerName];
|
1246
|
1246
|
[wkWebViewConfig.userContentController addUserScript:self.postMessageScript];
|
1247
|
1247
|
}
|
1248
|
|
- // FIXME: For a separate (minor) PR: these two shouldn't be gated by messagingEnabled; just keeping consistency with previous behaviour.
|
1249
|
|
- if (self.atStartScript) {
|
1250
|
|
- [wkWebViewConfig.userContentController addUserScript:self.atStartScript];
|
1251
|
|
- }
|
1252
|
1248
|
if (self.atEndScript) {
|
1253
|
1249
|
[wkWebViewConfig.userContentController addUserScript:self.atEndScript];
|
1254
|
1250
|
}
|
1255
|
1251
|
}
|
|
1252
|
+ // Whether or not messaging is enabled, add the startup script if it exists.
|
|
1253
|
+ if (self.atStartScript) {
|
|
1254
|
+ [wkWebViewConfig.userContentController addUserScript:self.atStartScript];
|
|
1255
|
+ }
|
1256
|
1256
|
}
|
1257
|
1257
|
|
1258
|
1258
|
- (NSURLRequest *)requestForSource:(id)json {
|