0
votes

I am looking for a way to determine the actual value of attributes such as fill or stroke of elements contained in an SVG (path, circle, ...). I know of several ways to parse an SVG and access direct element attributes, but I can't find an easy way to determine the value of an attribute as it will be displayed taking into account cascading styles and xlink:href references.

1
window.getComputedStyle(element)Robert Longson

1 Answers

0
votes

The method window.getComputedStyle applied to the element does exactly that!