dpogue commented on a change in pull request #1050:
URL: https://github.com/apache/cordova-ios/pull/1050#discussion_r552788845



##########
File path: CordovaLib/Classes/Public/CDVViewController.m
##########
@@ -505,9 +505,10 @@ - (UIView*)newCordovaViewWithFrame:(CGRect)bounds
             self.webViewEngine = 
[[NSClassFromString(defaultWebViewEngineClass) alloc] initWithFrame:bounds];
         }
     } else {
-        self.webViewEngine = [[NSClassFromString(defaultWebViewEngineClass) 
alloc] initWithFrame:bounds];
+        WKWebViewConfiguration *config = [self 
respondsToSelector:@selector(configuration)] ? [self configuration] : nil;
+        self.webViewEngine = [[NSClassFromString(defaultWebViewEngineClass) 
alloc] initWithFrame:bounds configuration:config];

Review comment:
       It looks like you're only applying this in the case when an engine is 
not specified.
   
   What might be best is to make a private 
`initWebViewEngine:(NSClass)engineClass` method that takes in the engine class, 
and checks if it responds to `initWithFrame:configuration:` and calls that, 
falling back to `initWithFrame:`.
   
   Then we'd call `initWebViewEngine:` on lines 502, 505, and 509 here




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to