-3

I'm using JSBin for a code sample and the sample doesn't work properly. It appears it's the same limitation which Python SimpleHTTPServer shares...code works fine on NodeJS server as well as Google App Engine Dev server.

Help appreciated since can't even ask what's wrong with my code until I have a code bin on which I can replicate the issue...

theguy
  • 1
  • 1
  • what if you try separating JS, CSS and HTML ? – xShirase Oct 04 '14 at 20:06
  • Did you try to run your code on http://jsfiddle.net or any other web service? – msrd0 Oct 04 '14 at 20:12
  • There are numerous problems, but for starters You are mixing versions. If you are loading elements from `polymer-project.org` you should load `platform.js` from there too. IIRC, Plunker for one has good support for referencing other Plunker files. – Scott Miles Oct 04 '14 at 20:37
  • Thanks Scott, right on both counts. – theguy Oct 05 '14 at 17:44
  • @scott-miles, thanks for suggestions; still getting the following error, not sure whether can ignore (code works except for original issue: unclear whether Plunker is contributing), whether there's a workaround, or whether Polymer is fundamentally incompatible with community debugging: [Redirect at origin 'http://www.polymer-project.org' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://run.plnkr.co' is therefore not allowed access.](http://plnkr.co/edit/kp69YpPEHDCQU4h1sOUN) – theguy Oct 05 '14 at 17:54
  • OK, not super-safe, but can bypass CORS error by starting Chrome browser with "google-chrome --disable-web-security" (Linux), so will consider this solved. Thanks – theguy Oct 05 '14 at 18:21
  • Load platform from `` instead of the shorter version you are using. The shorter version contains the problematic redirect. Fwiw, you can generally omit the `http:` as I did here, which saves a bit of typing. – Scott Miles Oct 05 '14 at 21:01

1 Answers1

0

@scott-miles was right re. using Plunker and mixing versions.

Redirect CORS issue can be dealt with by disabling web security on browser startup

Community
  • 1
  • 1
theguy
  • 1
  • 1
  • Be very careful to only use that browser for development if you have disabled web security, otherwise sites may be able to exploit it to access resources on your behalf on any site you go to (your bank, your email, etc). – Peter Burns Oct 06 '14 at 15:51