diff --git a/interface/wx/webview.h b/interface/wx/webview.h
index 6c5a2b0ad6..1bdd57100c 100644
--- a/interface/wx/webview.h
+++ b/interface/wx/webview.h
@@ -285,7 +285,7 @@ public:
Edge WebView2.
It is available for Windows 7 and newer.
The following features are currently unsupported with this backend:
- virtual filesystems, custom urls, find, source code.
+ virtual filesystems, custom urls, find.
This backend is not enabled by default, to build it follow these steps:
- Visual Studio 2015, or newer, is required
diff --git a/src/msw/webview_edge.cpp b/src/msw/webview_edge.cpp
index 88ff6c13a2..62481fa28e 100644
--- a/src/msw/webview_edge.cpp
+++ b/src/msw/webview_edge.cpp
@@ -492,14 +492,16 @@ void wxWebViewEdge::Reload(wxWebViewReloadFlags WXUNUSED(flags))
wxString wxWebViewEdge::GetPageSource() const
{
- // TODO: not implemented in SDK (could probably be implemented by script)
- return wxString();
+ wxString text;
+ const_cast(this)->RunScript("document.documentElement.outerHTML;", &text);
+ return text;
}
wxString wxWebViewEdge::GetPageText() const
{
- // TODO: not implemented in SDK (could probably be implemented by script)
- return wxString();
+ wxString text;
+ const_cast(this)->RunScript("document.body.innerText;", &text);
+ return text;
}
bool wxWebViewEdge::IsBusy() const