You might need to try a different GWT linker that supports cross-site requests. I'll look to see which one I used tonight.
--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/Y1pPOVZmeoU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
public class CspLinker extends DirectInstallLinker {
@Override
protected String getJsInstallLocation(LinkerContext context) {
return "path/to/modified/script/installLocationMainWindow.js";
}
}
function setupInstallLocation() {
if (init) {
return;
}
// var script = window.document.createElement('script');
// script.language='javascript';
// script.text = "var $wnd = window;";
// window.document.body.appendChild(script);
window.$wnd = window;
init = true;
}
<define-linker name="cspLinker" class="com.foo.bar.chrome.linker.CspLinker" />
<add-linker name="cspLinker" />
You might need to try a different GWT linker that supports cross-site requests. I'll look to see which one I used tonight.
On Feb 10, 2014 8:52 AM, "alucard" <slice.of...@gmail.com> wrote:
I am not sure I understood well but it seems that you loaded the GWT app in a webview or something similar. That is not what I meant. I'd like to be able to invoke the chrome.* apis from my GWT app (after I wrap them). I tried this by modifying the Browser sample app. I modified the browser.html file to load the GWT app. The GWT app is trivial, just an entry point with a simple JSNI method that logs a simple message via console.log (this part shouldn't break CSP). I tried with and without the DirectInstallLinker, the result is a bit better with the linker (it reports fewer errors in the app console) but it does not work either way.--I didn't get the part about the "loaders".Thanks for your help.On Sunday, February 9, 2014 3:18:42 PM UTC+1, Andrew Mackenzie wrote:I've developed a Chrome extension using mainly GWT, but it's mostly loaded by the extension remotely (loading JS handcrafted). It's mainly a build/packaging problem. GWT will build the JS for you and the "loaders" then you have to include into your extension file hierarchy in your build, and load as you desire.
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/Y1pPOVZmeoU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsub...@googlegroups.com.