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

Missing support for onLoad #110

Closed
drcmda opened this issue Dec 15, 2015 · 2 comments
Closed

Missing support for onLoad #110

drcmda opened this issue Dec 15, 2015 · 2 comments

Comments

@drcmda
Copy link

drcmda commented Dec 15, 2015

Hello Addy,

my site uses Javascript to calculate height for certain elements (section waypoints). Usually this is safe to do when the document has loaded. With critical though my css is async. JS calculates wrong and sometime later the css comes in. Fillament has an event for it luckily.

This is what critical generates for me:

<script>
(function(u){function loadCSS(e,t,n){"use strict";function r(){for(var t,i=0;i<d.length;i++)d[i].href&&d[i].href.indexOf(e)>-1&&(t=!0);t?o.media=n||"all":setTimeout(r)}var o=window.document.createElement("link"),i=t||window.document.getElementsByTagName("script")[0],d=window.document.styleSheets;return o.rel="stylesheet",o.href=e,o.media="only x",i.parentNode.insertBefore(o,i),r(),o}for(var i in u){loadCSS(u[i]);}}(['http://fonts.googleapis.com/css?family=Open+Sans:400|Special+Elite','fonts/exchange.f9715081.css','default.dd83315a.css']));
</script>

loadCSS would, in theory return 3 links, together with the polyfill they offer i could make it work if there would be a way to expose them.

Thanks! (-:

@bezoerb
Copy link
Collaborator

bezoerb commented Jan 18, 2016

@drcmda this issue could not be solved here as the inlining is handled by inline-critical. I made an issue over there

@bezoerb
Copy link
Collaborator

bezoerb commented Jan 18, 2016

closed in favor of bezoerb/inline-critical#47

@bezoerb bezoerb closed this as completed Jan 18, 2016
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

2 participants