Unless I misunderstand, `insertRule()` takes a string which is then parsed. The CSS Typed OM is still a WIP: https://drafts.css-houdini.org/css-typed-om-1/
-
-
Replying to @slightlylate @addyosmani and
Right, is that very different from the perf of <style>? insertRule() avoids adding text node to the dom (as opp to appending text to style)
2 replies 0 retweets 0 likes -
Replying to @threepointone @slightlylate and
With fiber/rIC, it interleaves these changes with dom updates, which is nice
1 reply 0 retweets 0 likes -
Replying to @threepointone @addyosmani and
Not sure what you're buying. The CSS is still a JS string that is getting passed from the JS to DOM. Better off disabling a stylesheet?
1 reply 0 retweets 0 likes -
Replying to @slightlylate @threepointone and
And I don't know what Fiber does for you here (aside from fewer janky frames overall). Total work the same.
1 reply 0 retweets 0 likes -
Replying to @slightlylate @threepointone and
Is "double parse" what happens when CSS strings are embedded in JS like Webpack does?
2 replies 0 retweets 0 likes -
Replying to @sebmarkbage @slightlylate and
If the CSS string is loaded from XHR, substr, then inserted. Does that avoid the problem or is Chrome's CSS parser unable to use the string?
1 reply 0 retweets 0 likes -
Replying to @sebmarkbage @threepointone and
You've still pulled it into the JS engine first. Again, not a huge cost, but I'm not sure why you *would* do it. Paying lots of costs.
3 replies 0 retweets 3 likes -
Replying to @slightlylate @sebmarkbage and
Specifically with XHR/fetch, you're in the lowest priority network fetch bucket. If the CSS is critical, that's Bad News (TM)
2 replies 0 retweets 3 likes -
Replying to @slightlylate @threepointone and
If you don't have any other network fetches it is the highest priority. :D
1 reply 0 retweets 1 like
Yes. But this has caught GMail out for a long time. You'll always be in contention at startup.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.