Post

Replies

Boosts

Views

Activity

iOS 15 WKWebview evaluateJavaScript API does not work for accessing "window.subObj"
We call webView evaluateJavaScript:javaScript completionHandler:^(id _Nullable result, NSError *_Nullable error) API to inject a javascript to WKWebView. The javascript contains "window.***"definition. Since iOS 15, "window.***" can not be found and it will return "undefined" when accessing "window.***" . It seems that javascript "window" object can not have any custom sub-object. However same javascript code works fine on iOS 14.x and below. Any ideas? Thanks!
4
0
2.7k
Aug ’21