findRoot method

SVGSVGElement? findRoot()

Implementation

SVGSVGElement? findRoot() {
  var parent = parentElement;
  while (parent is SVGElement) {
    if (parent is SVGSVGElement) {
      return parent;
    }
    parent = parent.parentElement;
  }

  return null;
}