Ok just tried it myself.
Created a new, fresh project having <div id="hello">world</div> in my host
page using
public void onModuleLoad() {
Global.window.alert("Element found: " + (Global.document.getElementById(
"hello") != null));
}
GWT 2.8 RC2 returns true
_.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));
}
GWT 2.8 SNAPSHOT (09.09.2016) returns false
_.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));
}
So I guess its a bug in GWT 2.8 SNAPSHOT as I think the JS output of GWT
2.8 SNAPSHOT should be that way it is above if @JsType(isNative = true,
namespace = "window") is used. However elemental2 uses JsPackage.GLOBAL as
namespace.
-- 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-web-toolkit-contributors/25c12ba5-120c-47e0-b52a-c386691b9618%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.