There’s API for getting a web archive of the entire page, but not just the main resource.
Created attachment 233441 [details] Add -[WKWebView _getMainResourceDataWithCompletionHandler:]
Fixed in <http://trac.webkit.org/r170222>.