🎃 A scary good deal! Join the Lean Web Club today and get 1 month free, plus 30% off for the first three months after that. Click here to join for free now! My preferred style of authoring Web Components is to start with existing HTML and enhance it once the Web Component loads. For example, if I were building a show/hide component, I might start with a I'd also use the
Note: this is for teaching purposes only. Don't email me about When the Web Component loads and the JavaScript initializes, I'd remove the
When I talk about building Web Components this way, I often get emails asking me about FOUC, the Flash of Unstyled Content that happens when the HTML is ready but the JS hasn't loaded yet. The
I don't think so. At the least, it's better for user experience that the JS failing and the user not being able to access anything at all. FOUC is a side-effect of progressive enhancement. It means that user is getting something usable. To me, that's a more than worthwhile tradeoff when the alternative is they get something completely unusable until the JavaScript is ready. Cheers, Want to share this with others or read it later? View it in a browser. |
0 Komentar untuk "[Go Make Things] Web Components and FOUC"