Friday, October 23, 2015

Re: SuperDevMode and same origin policy



On Friday, October 23, 2015 at 1:14:31 PM UTC+2, Jens wrote:

Thomas, you are right. I had some conditional logic which chose which scripts should be loaded in production or dev mode (original or minified and merged) but I used GWT.isProdMode() and forgot that in SDM it returns true... Sorry for that.

You can use the following in your condition:

public static boolean isSDM() {
 
return GWT.isScript() && !GWT.getModuleBaseForStaticFiles().equals(GWT.getModuleBaseURL());
}



And in GWT 2.8+ Boolean.parseBoolean(System.getProperty("superdevmode")) ;-)
(which reminds me that Boolean.getBoolean() and friends aren't emulated)

--
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 post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment