extractHtml method
Implementation
Future<String> extractHtml() async {
if (_webViewController == null) {
throw Exception('WebViewController not initialized.');
}
if (Platform.isWindows) {
return await _webViewController.executeScript('document.documentElement.outerHTML');
} else if (Platform.isMacOS) {
return await _webViewController.evaluateJavascript('document.documentElement.outerHTML');
}
return '';
}