Friday, September 26, 2014

Re: XMLHttpRequest: invalid response when loading data from Client Bundle

Looks like Snap.load() always wants to do an Ajax request. Because your SVG data URI does not match the same protocol:host:port as http://127.0.0.1:8888 the Same-origin-policy of browsers kicks in and blocks the request. Basically: You can not do an Ajax request for a data URI.

I guess you need to find a different Snap method to load SVG Strings already available on the client. Maybe Snap.parse()? Maybe you also need to use TextResource so that GWT does not generate base64 encoded data URIs and instead embeds the pure text/source of your SVG into your JS.

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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