Deprecate WKScriptMessage.webView as it is redundant now that WKFrameInfo has a webView property. The webView property was added to WKFrameInfo in r219013. Moving forward developers should use -[WKScriptMessage frameInfo].webView to get the WKWebView that sent the script message.
<rdar://problem/33367745>
Created attachment 315758 [details] Patch
(In reply to Daniel Bates from comment #0) > Deprecate WKScriptMessage.webView as it is redundant now that WKFrameInfo > has a webView property. The webView property was added to WKFrameInfo in > r219013. Moving forward developers should use -[WKScriptMessage > frameInfo].webView to get the WKWebView that sent the script message. Why should developers take two steps to get to something that previously required only one?
Comment on attachment 315758 [details] Patch It’s not clear what motivates this deprecation.
(In reply to mitz from comment #3) > (In reply to Daniel Bates from comment #0) > > Deprecate WKScriptMessage.webView as it is redundant now that WKFrameInfo > > has a webView property. The webView property was added to WKFrameInfo in > > r219013. Moving forward developers should use -[WKScriptMessage > > frameInfo].webView to get the WKWebView that sent the script message. > > Why should developers take two steps to get to something that previously > required only one? It's duplicative to have two ways to get the same information. I do not feel strongly about this patch and hence I did not put it up for review. Geoff Garen suggested that I deprecate WKScriptMessage.webView when I spoke to him last Friday (07/14). Maybe Geoff can provide more insight into his motivation?
(In reply to Daniel Bates from comment #5) > (In reply to mitz from comment #3) > > (In reply to Daniel Bates from comment #0) > > > Deprecate WKScriptMessage.webView as it is redundant now that WKFrameInfo > > > has a webView property. The webView property was added to WKFrameInfo in > > > r219013. Moving forward developers should use -[WKScriptMessage > > > frameInfo].webView to get the WKWebView that sent the script message. > > > > Why should developers take two steps to get to something that previously > > required only one? > > It's duplicative to have two ways to get the same information. Convenience methods often duplicate something that can be done in another, less convenient way. Deprecating API burdens everyone who is already using it. In this case, we are also creating undue burden for anyone who might have used it in the future, because they’d have to go through two accessors. But what is the upside? Even in the unimaginable future in which the property is removed entirely, I don’t see it. > I do not feel > strongly about this patch and hence I did not put it up for review. Geoff > Garen suggested that I deprecate WKScriptMessage.webView when I spoke to him > last Friday (07/14). Maybe Geoff can provide more insight into his > motivation?