findRoot method

DefsAttributeElement? findRoot()

Implementation

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

  return null;
}