ArcBees / gwtquery

A jQuery clone for GWT, and much more.
MIT License
85 stars 38 forks source link

$(window) causes exception when the page containing my gwt module is accessed by https #381

Open biancashouse opened 8 years ago

biancashouse commented 8 years ago

When my module is fetched by a page accessed via http, it is good, but when the page is accessed via https I get"

configure-0.js:14352 Uncaught com.google.gwt.core.client.JavaScriptException: (SecurityError) : Blocked a frame with origin "https://htmlhub.io" from accessing a cross-origin frame.

It is not a CORS issue, because the module does start up and runs ok until it encounter any attempt to access $(window); e.g. int w = $(window).width();

biancashouse commented 8 years ago

Digging deeper, the exception happens in JSUtils:

/**

Get the exception when the return line executes. Just prior to the return, r is '[object Window']

biancashouse commented 8 years ago

Finally, by removing all references to GQuery.window and $(window) and instead using the gwt Window object the issue resolves.