Created
October 13, 2019 19:01
-
-
Save mycroftcanner/a272cdbb97182063e66a8f86d24ebde9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return configure(WKWebView( | |
frame: .zero, | |
configuration: configure(WKWebViewConfiguration()) { | |
$0.userContentController = configure(WKUserContentController()) { | |
$0.addUserScript( | |
WKUserScript( | |
source: source, | |
injectionTime: .atDocumentEnd, | |
forMainFrameOnly: true | |
) | |
) | |
} | |
} | |
) | |
){ | |
$0.isOpaque = false | |
$0.backgroundColor = .clear | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment