getComputedStyle method

CSSStyleDeclaration getComputedStyle(
  1. Element elt, [
  2. String? pseudoElt
])

The Window.getComputedStyle() method returns an object containing the values of all CSS properties of an element, after applying active stylesheets and resolving any basic computation those values may contain.

Individual CSS property values are accessed through APIs provided by the object, or by indexing with CSS property names.

Implementation

external CSSStyleDeclaration getComputedStyle(
  Element elt, [
  String? pseudoElt,
]);