diff options
author | Grant Gayed <ggayed> | 2007-08-23 20:21:06 +0000 |
---|---|---|
committer | Grant Gayed <ggayed> | 2007-08-23 20:21:06 +0000 |
commit | b6bd051b7c6f12a7a043b8cf358ecab3e989e4cd (patch) | |
tree | 0db4561a857a2561c4ae5c2f7093b7d1047b6e5e | |
parent | 3a4282e8770b58da28b274b0451679251e5b2409 (diff) | |
download | eclipse.platform.swt-b6bd051b7c6f12a7a043b8cf358ecab3e989e4cd.tar.gz eclipse.platform.swt-b6bd051b7c6f12a7a043b8cf358ecab3e989e4cd.tar.xz eclipse.platform.swt-b6bd051b7c6f12a7a043b8cf358ecab3e989e4cd.zip |
107142
2 files changed, 20 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java index 5ef64d2323..e11fe8b78d 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java @@ -410,6 +410,24 @@ public boolean forward () { } /** + * Returns a string with HTML that represents the content of the current page. + * + * @return HTML representing the current page or an empty <code>String</code> + * if this is empty + * + * @exception SWTException <ul> + * <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li> + * <li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li> + * </ul> + * + * @since 3.4 + */ +public String getText () { + checkWidget(); + return webBrowser.getText (); +} + +/** * Returns the current URL. * * @return the current URL or an empty <code>String</code> if there is no current URL diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java index acc5d11655..4c8e78ed74 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java @@ -87,6 +87,8 @@ public abstract boolean execute (String script); public abstract boolean forward (); +public abstract String getText (); + public abstract String getUrl (); public Object getWebBrowser () { |