Bug 221663
Summary: | -[WKWebView setDrawsBackground:] should be API | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jonathan Deutsch <jonathan> |
Component: | WebKit API | Assignee: | 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
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/74423453>