Saturday, August 3, 2024

location.origin is null in GWT 2.11

Hello,
After switching to GWT 2.11 from 2.9 the following code prints null. Though it works in SuperDevMode but when it is built for deployment it produces null. It breaks communications (forth and back) using window.postMessage since it relies on proper origin provided (matching). What could be the reason?
public static native boolean originToConsole() /*-{
console.log("location.origin = " + location.origin);
}-*/;

Thanks 

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/918f3527-0dfa-425b-8026-8f79c428af55n%40googlegroups.com.

No comments:

Post a Comment