aboutsummaryrefslogtreecommitdiffstats
path: root/gwtquery-core
diff options
context:
space:
mode:
authorManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2013-11-26 10:05:33 +0100
committerManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2013-11-26 10:05:33 +0100
commit2c0fbe5febef04ae56124281718789dd7dee7d9c (patch)
treed61a0d7c200e0e70e6504b0547f1b19f2a9dec15 /gwtquery-core
parenteccb54f9bc23f6e4dd63e8a141987ea70dacaad4 (diff)
downloadgwtquery-2c0fbe5febef04ae56124281718789dd7dee7d9c.tar.gz
gwtquery-2c0fbe5febef04ae56124281718789dd7dee7d9c.zip
Use GWT way to get $wnd instead of maintain our own jsni code
Diffstat (limited to 'gwtquery-core')
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
index 5950f6bf..479f90ab 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
@@ -25,6 +25,7 @@ import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import com.google.gwt.core.client.JsArrayMixed;
import com.google.gwt.core.client.JsArrayString;
+import com.google.gwt.core.client.ScriptInjector;
import com.google.gwt.dom.client.*;
import com.google.gwt.dom.client.Style.Display;
import com.google.gwt.dom.client.Style.HasCssName;
@@ -176,7 +177,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* The window object.
*/
- public static final Element window = GWT.isClient() ? window() : null;
+ public static final Element window = GWT.isClient() ? ScriptInjector.TOP_WINDOW.<Element>cast() : null;
private static Element windowData = null;
@@ -766,10 +767,6 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
e.value = value;
}-*/;
- private static native Element window() /*-{
- return $wnd;
- }-*/;
-
protected Node currentContext;
protected String currentSelector;