JS 部分は document.documentElement.innerHTML としてます。 1. evaluateJavaScript(_:completionHandler:) を使う webView.evaluateJavaScript("document.documentElement.innerHTML") { value, error in print(value as? String) } extension WKWebView { @discardableResult func evaluate(javaScript script: String) -> String? { var result: String? var isCompletion: Bool = false self.evaluateJavaScript(script) { value, _ in re