ScriptInjector.fromString(pBundle.d3JS().getText()).inject();
To load D3 using a TextResource.
Since today (just came back after 2 weeks of holidays) the D3 object is no longer available in $wnd.
I changed the code to this:
ScriptInjector.fromString(pBundle.d3JS().getText()).setWindow(ScriptInjector.TOP_WINDOW).inject();
and then it works.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/7862784c-854a-4bb1-85c0-2b7734a984d3%40googlegroups.com.
It is surprising as Jens pointed out, we always qualified references with $wnd until https://gwt-review.googlesource.com/#/c/15520/ (submitted 5 weeks ago). So it shouldn't have worked earlier if you were not injecting it to TOP_WINDOW.If it worked earlier, then we unintentionally fixed a bug. Could you double check if this was working before so we can see if there are some other unintended behavior change introduced somewhere else?
On Tue, Sep 6, 2016 at 2:43 AM, stuckagain <david...@gmail.com> wrote:
It was working fine before.Since it looks like JsInterop has changed recently (and it is still in beta) I will just update my code to either inject in the TOP_WINDOW or I try it with using window as namespace.
On Monday, September 5, 2016 at 6:29:48 PM UTC+2, Jens wrote:Hm wondering how it ever worked for you as JsInterop usually qualifies JS code with $wnd but your D3.js has been injected into the GWT iframe. So AFAICT with JsInterop you would had to use TOP_WINDOW anyways. You can make it work within the GWT iframe but then you can't use JsPackage.GLOBAL but use a namespace that points to the iframe content window.So it looks like this behavior has changed? But yes you would need to use "window" now to references the iframe's content window if you inject the code into the iframe.-- J.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/7862784c-854a-4bb1-85c0-2b7734a984d3%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAN%3DyUA0RioQk7GatwdbkvwZKT6gKDEmB0daytVoKa9a%3DnGUd3A%40mail.gmail.com.
I was depending on JsInterop Global.document to get access to UI components generated by my template engine.
The Global object is now scoped window, so I guess it is accessing the wrong document as well ?
On Wed, 7 Sep 2016 at 11:40, David <david...@gmail.com> wrote:
I'm sure that it worked before. I'm also seeing some other issues where I am using JsInterop to interact with some generated HTML - but I am still investigating if that is due to changes in GWT or in our codebase.
I did not work on this project for about 8 weeks, so I have quite a backlog to go through.
On Tue, 6 Sep 2016 at 19:28, 'Goktug Gokdogan' via GWT Contributors <google-web-toolkit-contri...@googlegroups.com> wrote:
It is surprising as Jens pointed out, we always qualified references with $wnd until https://gwt-review.googlesource.com/#/c/15520/ (submitted 5 weeks ago). So it shouldn't have worked earlier if you were not injecting it to TOP_WINDOW.If it worked earlier, then we unintentionally fixed a bug. Could you double check if this was working before so we can see if there are some other unintended behavior change introduced somewhere else?
On Tue, Sep 6, 2016 at 2:43 AM, stuckagain <david...@gmail.com> wrote:
It was working fine before.Since it looks like JsInterop has changed recently (and it is still in beta) I will just update my code to either inject in the TOP_WINDOW or I try it with using window as namespace.
On Monday, September 5, 2016 at 6:29:48 PM UTC+2, Jens wrote:Hm wondering how it ever worked for you as JsInterop usually qualifies JS code with $wnd but your D3.js has been injected into the GWT iframe. So AFAICT with JsInterop you would had to use TOP_WINDOW anyways. You can make it work within the GWT iframe but then you can't use JsPackage.GLOBAL but use a namespace that points to the iframe content window.So it looks like this behavior has changed? But yes you would need to use "window" now to references the iframe's content window if you inject the code into the iframe.-- J.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/7862784c-854a-4bb1-85c0-2b7734a984d3%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAN%3DyUA0RioQk7GatwdbkvwZKT6gKDEmB0daytVoKa9a%3DnGUd3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/CABrJHW2iWUBMUEThzroC7sZYnujoqXKo%3DTgmMjp2qh4uneCEmA%40mail.gmail.com.To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.
Global object is not scoped to window unless you explicitly say "window"; so it should be $wnd by default.On Wed, Sep 7, 2016 at 2:50 AM, David <david...@gmail.com> wrote:
I was depending on JsInterop Global.document to get access to UI components generated by my template engine.
The Global object is now scoped window, so I guess it is accessing the wrong document as well ?
On Wed, 7 Sep 2016 at 11:40, David <david...@gmail.com> wrote:
I'm sure that it worked before. I'm also seeing some other issues where I am using JsInterop to interact with some generated HTML - but I am still investigating if that is due to changes in GWT or in our codebase.
I did not work on this project for about 8 weeks, so I have quite a backlog to go through.
On Tue, 6 Sep 2016 at 19:28, 'Goktug Gokdogan' via GWT Contributors <google-web-tool...@googlegroups.com> wrote:
It is surprising as Jens pointed out, we always qualified references with $wnd until https://gwt-review.googlesource.com/#/c/15520/ (submitted 5 weeks ago). So it shouldn't have worked earlier if you were not injecting it to TOP_WINDOW.If it worked earlier, then we unintentionally fixed a bug. Could you double check if this was working before so we can see if there are some other unintended behavior change introduced somewhere else?
On Tue, Sep 6, 2016 at 2:43 AM, stuckagain <david...@gmail.com> wrote:
It was working fine before.Since it looks like JsInterop has changed recently (and it is still in beta) I will just update my code to either inject in the TOP_WINDOW or I try it with using window as namespace.
On Monday, September 5, 2016 at 6:29:48 PM UTC+2, Jens wrote:Hm wondering how it ever worked for you as JsInterop usually qualifies JS code with $wnd but your D3.js has been injected into the GWT iframe. So AFAICT with JsInterop you would had to use TOP_WINDOW anyways. You can make it work within the GWT iframe but then you can't use JsPackage.GLOBAL but use a namespace that points to the iframe content window.So it looks like this behavior has changed? But yes you would need to use "window" now to references the iframe's content window if you inject the code into the iframe.-- J.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/7862784c-854a-4bb1-85c0-2b7734a984d3%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAN%3DyUA0RioQk7GatwdbkvwZKT6gKDEmB0daytVoKa9a%3DnGUd3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/CABrJHW2iWUBMUEThzroC7sZYnujoqXKo%3DTgmMjp2qh4uneCEmA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAN%3DyUA1cpbN2rOA0Ka%3D%2ByqiDMU2-UcFcWwVp4ueMc8Ms20r4-g%40mail.gmail.com.
This scoping is all very confusing :-).Anyway, this is what I am seeing with Elemental2:- I have an application that generates HTML using a custom templating system.- I then put the HTML string in an Element with setInnerSafeHtml.- After this I use Element2 to bind to the generated html. For that I was using Global.document.getElementById(...).This used to work, but since a few weeks this stopped working.I now have to use Global.window.top.document.getElementById(...) to get access to the ui dom nodes that I generated.Is this how it is supposed to be ? I was probably making the wrong assumptions before ?
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/9b7a6321-c9ca-44a8-bd8d-01e6dc113f13%40googlegroups.com.
public void onModuleLoad() {
Global.window.alert("Element found: " + (Global.document.getElementById("hello") != null));
}_.onModuleLoad_4_g$ = function onModuleLoad_3_g$(){
($clinit_Global_0_g$() , $wnd.window.window).alert('Element found: ' + jsNotEquals_0_g$(($clinit_Global_0_g$() , $wnd.window.document).getElementById('hello'), null));
}_.onModuleLoad_4_g$ = function onModuleLoad_3_g$(){
($clinit_Global_0_g$() , window).alert('Element found: ' + jsNotEquals_0_g$(($clinit_Global_0_g$() , document).getElementById('hello'), null));
}Can you file an issue and ping Daniel (by mail or hangout) to delay the RC3 a bit? (if not already too late, as it's 4pm cest)
Can you file an issue and ping Daniel (by mail or hangout) to delay the RC3 a bit? (if not already too late, as it's 4pm cest)Done.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/6386bb88-f488-4144-b830-99ddb387b677%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/CALLujirOwMPQTKzDuJtmtF0hF2bXVr%3Dij-V240vzP6Bh5SMRAA%40mail.gmail.com.
Another issue at may warrant attention - https://github.com/gwtproject/gwt/issues/9424. This was brought up some time ago, but wasn't reduced to be reproducible until now (which is funny, given how minimal the test case is).
On Fri, Sep 9, 2016 at 9:30 AM 'Daniel Kurka' via GWT Contributors <google-web-toolkit-contri...@googlegroups.com> wrote:
On Fri, Sep 9, 2016 at 4:12 PM Jens <jens.ne...@gmail.com> wrote:
Can you file an issue and ping Daniel (by mail or hangout) to delay the RC3 a bit? (if not already too late, as it's 4pm cest)Done.--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/6386bb88-f488-4144-b830-99ddb387b677%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.