3 ms·
Yes, I was looking at the DOM. But why add styles as attributes? There is any performance improvement? Couldn't be done with just CSS?
by silveira 14y ago
Yes, I was looking at the DOM. But why add styles as attributes? There is any performance improvement? Couldn't be done with just CSS?
- TazeTSchnitzel 14y agoWell that is CSS. And of course there's a performance improvement - unless you're applying a transformation to a hundred or so elements, it's usually much quicker to directly manipulate element.style than generate some CSS, put it in a style element, append that to the DOM, and wait for the browser to parse the CSS.