Implement GetPageText for the OSX WebKit implementation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ef53bf2a7b
commit
c6ea1fdaf9
@ -58,7 +58,7 @@ public:
|
||||
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;
|
||||
|
@ -920,6 +920,13 @@ void wxWebViewWebKit::ClearSelection()
|
||||
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 )
|
||||
|
Loading…
Reference in New Issue
Block a user