svgdotjs / svgdom

Straightforward DOM implementation to make SVG.js run headless on Node.js
MIT License
269 stars 53 forks source link

Fix SVGElement.viewportElement #77

Closed biojet1 closed 3 years ago

biojet1 commented 3 years ago

According to MDN SVGElement.viewportElement is the nearest ancestor element, ownerSVGElement also

Fuzzyma commented 3 years ago

please adhere to the coding style. Otherwise I cant really see what you changed because every line is red

biojet1 commented 3 years ago

I made a mistake so I committed again, I also adjusted the style

The fix was the viewportElement and ownerSVGElement method returns the farthest svg ancestor element.

The specs says the nearest

Fuzzyma commented 3 years ago

haha now this pr makes much more sense :D. Can you get rid of the semicoli? Then I can merge :). Thank you!!

biojet1 commented 3 years ago

Semicolons removed