Summary: | Why is the WKScriptMessage API only one way? | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ricci Adams <webkit.org> |
Component: | WebKit API | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | andersca, beidson, dieter, krzysztof.modras, sam |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Description
Ricci Adams
2014-06-25 20:38:12 PDT
Sounds like a good suggestion. Probably need a way to post a message to a single WKWebView, as well as broadcast messages (WKUserContentControllers can be shared between multiple WKWebViews). I'm hitting this again when trying to adopt WKWebView. Specifically, I need the ability to easily send an NSDictionary as a object. Even some kind of -[WKWebView evaluateJavaScript:andThenCallTheResultOfThatWithSomeArguments:completionHandler:] API would work. Usage (and a better name) might be: [_webView evaluateJavaScript:@"window.MyBridge" thenInvokeMethod:@"doSomething" withArguments:@[ dictionary ] completionHandler:nil] The functionality requested is now encompassed by https://bugs.webkit.org/show_bug.cgi?id=205239 in the WebKit project As far as when it may or may not be API, that’s a vendor (e.g. Apple) decision that wont be announced in the WebKit project *** This bug has been marked as a duplicate of bug 205239 *** |