Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS errors cause the library to not work #17

Open
AlexArchive opened this issue Oct 28, 2014 · 0 comments
Open

JS errors cause the library to not work #17

AlexArchive opened this issue Oct 28, 2014 · 0 comments

Comments

@AlexArchive
Copy link

My web page makes use of a couple of Google fonts which are referenced using link tags:

<link href="http://fonts.googleapis.com/css?family=Raleway:400,300,500,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css'>

On my Windows desktop running Chrome 38 the following errors propagate:

XMLHttpRequest cannot load http://fonts.googleapis.com/css?family=Raleway:400,300,500,700. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:2602' is therefore not allowed access. index.html:1
Uncaught Error! vminpoly.js:43
XMLHttpRequest cannot load http://fonts.googleapis.com/css?family=Lato:300,400,700. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:2602' is therefore not allowed access. index.html:1
Uncaught Error! vminpoly.js:43

It is difficult to confirm whether the library actually works on my desktop because Chrome 38 supports vh and vw. What I can confirm is that the correct styles are generated in the head tag.

The observable problem occurs on my Samsung Galaxy II running Chrome for Android 18. On my mobile device the polyfill simply doesn't work when those errors occur. When I remove/comment out the previously listed links - preventing the errors - the polyfill works.


My workaround is to link my Google Fonts using CSS @import instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant