Questions tagged [cssom]

CSSOM defines APIs (including generic parsing and serialization rules) for Media Queries, Selectors, and CSS itself.

The core features of the CSSOM are oriented towards providing basic capabilities to author-defined scripts to permit access to and manipulation of style related state information and processes.

Documentation: http://dev.w3.org/csswg/cssom/

64 questions
2
votes
1 answer

How is the root element of the CSSOM (CSS Object Model) determined

I've been researching browser rendering and I've just now come to the part in the render process where the browser constructs the CSSOM from raw CSS. In all of the tutorials I've seen the authors seem to make the assumption/assertion that the body…
Carl
  • 457
  • 5
  • 23
2
votes
1 answer

Browsers lazy-loading fonts with FontFace

So, I'm developing a simple web game with the Canvas API. I need to draw characters in the canvas using specified fonts. In the loading routine, I use promises to wait for the fonts I need, like this: Promise.all([ (new FontFace("LCD Solid",…
D. Pardal
  • 6,173
  • 1
  • 17
  • 37
2
votes
1 answer

Why is StyleSheet's ownerNode null after insertion?

Can somebody explain why a StyleSheet's ownerNode is null after I set its textContent to something? const style = document.createElement('style') document.head.appendChild(style) const sheet = style.sheet //…
G.G.
  • 634
  • 1
  • 5
  • 10
2
votes
1 answer

rule.style is undefined when processing document.styleSheets

Please bare in mind that I am still learning JavaScript so be kind please. I have the following code which searches a webpage for any CSS containing HTTP urls. However, there is one variable "v" which can sometimes be undefined. Error "rule.style is…
DaE
  • 189
  • 1
  • 4
  • 14
1
vote
3 answers

What does this empty string mean?