Last active
May 25, 2017 18:10
-
-
Save npu3pak/2742b026d4a6a7780f5fd024ebbe3269 to your computer and use it in GitHub Desktop.
Извлекаем коненте из отображаемой страницы WKWebView
This file contains hidden or 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
func htmlAsString()-> String? { | |
var result: String? | |
webView.evaluateJavaScript("document.documentElement.outerHTML.toString()") { (html: Any?, error: Error?) in | |
result = html as? String | |
} | |
return result | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment