Closed fskpf closed 5 years ago
Note that the clippath element could be anywhere in the SVG document:
An IRI reference to another graphical object within the same SVG document fragment which will be used as the clipping path. If the IRI reference is not valid (e.g it points to an object that doesn't exist or the object is not a ‘clipPath’ element) the ‘clip-path’ property must be treated as if it hadn't been specified.
An exception is thrown if an element has a clip-path and the referenced clipPath is not defined in the defs, but in the same element:
Throws
Uncaught TypeError: Cannot read property 'hasAttribute' of undefined
. This seems to be due to the implementation only looking in the defs elements:Maybe the clipPathNode access should be checked for null, though ideally the actual clipPath element should be found. Attached is a repo of the exception: broken-clippath_html.txt