As a curiosity, for simple things like this, you can avoid writing jsni methods by taking advantage of some jsni methods already present in the gwt overlay classes.
So, in your case, you can get the window object and pass it to the element, read its properties using getters from the Element class:
Element $wnd = (Element)Document.get().<Element>cast().getPropertyObject("defaultView"); boolean mybool = $wnd.getPropertyBoolean("mybool");
Adding the gwtquery library to your project is much simpler:
boolean mybool = $(window).prop("mybool");
source share