From 2c0fbe5febef04ae56124281718789dd7dee7d9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Carrasco=20Mo=C3=B1ino?= Date: Tue, 26 Nov 2013 10:05:33 +0100 Subject: [PATCH] Use GWT way to get $wnd instead of maintain our own jsni code --- .../src/main/java/com/google/gwt/query/client/GQuery.java | 7 ++----- 1 file 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 { /** * The window object. */ - public static final Element window = GWT.isClient() ? window() : null; + public static final Element window = GWT.isClient() ? ScriptInjector.TOP_WINDOW.cast() : null; private static Element windowData = null; @@ -766,10 +767,6 @@ public class GQuery implements Lazy { e.value = value; }-*/; - private static native Element window() /*-{ - return $wnd; - }-*/; - protected Node currentContext; protected String currentSelector; -- 2.39.5