Bug 221663

Summary: -[WKWebView setDrawsBackground:] should be API
Product: WebKit Reporter: Jonathan Deutsch <jonathan>
Component: WebKit APIAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Blocker CC: achristensen, ggaren, jonathan, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Mac (Apple Silicon)   
OS: macOS 11   

Jonathan Deutsch
Reported 2021-02-09 23:30:10 PST
This was an API in the WebView Legacy. Applications like Tumult Hype [https://tumult.com/hype/] allow users to author content, which may inherently want a transparent background. While the editor itself will probably use an opaque window, an export flow may want to export via -takeSnapshotWithConfiguration and use a transparent WKWebView to render into. Right now, the only way to get a transparent WKWebView is something like: if(@available(macOS 10.13, *)) { [webView setValue:@NO forKey:@"drawsBackground"]; } else { [webView setValue:@YES forKey:@"drawsTransparentBackground"]; } I am surprised WebView was deprecated without providing this.
Attachments
Radar WebKit Bug Importer
Comment 1 2021-02-16 23:31:13 PST
Note You need to log in before you can comment on or make changes to this bug.