Reputation: 1
I'm developing a Chrome extension using GWT. I have to get the URL of the page when I open the extension. I have to do this because I need to read the page's contents to take some data.
Any ideas?
Thanks.
Upvotes: 0
Views: 621
Reputation: 46841
Try with GWT.getModuleBaseURL() and GWT.getModuleName() and GWT.getHostPageBaseURL().
Look at other methods available in GWT class for this purpose.
Output in DEV mode:
GWT.getModuleBaseURL();
GWT.getHostPageBaseURL();
GWT.getModuleName();
output:
http://127.0.0.1:8899/gwtproject/
http://127.0.0.1:8899/
gwtproject
Upvotes: 1