git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68570
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT);
virtual void Stop();
virtual wxString GetPageSource();
- virtual wxString GetPageText() { return ""; }
+ virtual wxString GetPageText();
//We do not want to hide the other overloads
using wxWebView::SetPage;
RunScript("window.getSelection().removeAllRanges();");
}
+wxString wxWebViewWebKit::GetPageText()
+{
+ id result = [[m_webView windowScriptObject]
+ evaluateWebScript:@"document.body.textContent"];
+ return wxStringWithNSString([result stringValue]);
+}
+
void wxWebViewWebKit::EnableHistory(bool enable)
{
if ( !m_webView )