Open qrider opened 11 years ago
A possible future solution, should F2 adopt AMD as its loading mechanism, would be to use the stylesheet as a dynamic AMD dependency to ensure that it is loaded before F2 renders....
require(["css!yourStyleSheet.css",..], function(){
.... F2.renderApp();
})
Need to keep an eye on browser compatibility for something like this and how it relates to F2's browser compatibility.
According to the YepNope site, CSS callbacks were removed recently in favor of the official plugin.
This might be useful -- http://www.phpied.com/when-is-a-stylesheet-really-loaded/
Looks like there is no mechanism determining when the style sheets are loaded which has the potential of showing unstyled content on slow file loads. Currently we are experiencing this issue when going through a client proxy/relay.
I think this can be solved by providing an onload event for each stylesheet. https://developer.mozilla.org/en-US/docs/HTML/Element/link#Stylesheet_load_events