Re: jsinterop: GWT app as a widdget: default script injection fails.

2016-06-03 Thread Vassilis Virvilis
I haven't thought of multiple gwt widgets (I am struggling with one). Obviously you are correct in what you are saying. It would be cool if we could feed jsinterop the scope per js injection. However I can't imagine how that would be. You may need to change your interface (namespace argument) in

Re: jsinterop: GWT app as a widdget: default script injection fails.

2016-06-03 Thread Jens
Probably needs to be updated a bit if you want to run multiple GWT apps with different names/iframes as widgets on the page as you need a global variable per app then. If you know everything is served from the same domain you can probably also use window.frames['appId'].contentWindow But

Re: jsinterop: GWT app as a widdget: default script injection fails.

2016-06-03 Thread Vassilis Virvilis
So here is a hacky workaround: Q: What the hacky workaround enables? A: You can inject any js library you want in the GWT iframe thus succeeding encapsulation of the GWT and js code from the rest of the page. No duplicate libaries - no clashed versions etc. Q: Does it work? A: sort of. jquery

Re: jsinterop: GWT app as a widdget: default script injection fails.

2016-05-30 Thread Vassilis Virvilis
This looks like the logical conclusion to my question. https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Isolated-Imports-Proposal.md Since the aboveis probably several years down the road I wonder if anyone has any more ideas or workarounds in how to work with GWT/jsinterop and

jsinterop: GWT app as a widdget: default script injection fails.

2016-05-26 Thread Vassilis Virvilis
Hi, This issue has been discussed before https://github.com/gwtproject/gwt/issues/9264 Here is the problem in my own words: When a script is injected GWT has the option to inject it in the TOP_WINDOW ($wnd) or in the iframe window where GWT code is located normally. Case 1: Insert in $wnd