This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The SVG <use> element has a horrifying "instance tree" related to ShadowDOM, but does not retarget. The SVGElementInstance (the instanceRoot type) has parts of a Node's API, but not all (like .contains). For native events the SVGElementInstance will bubble events up to the <use> element, even non-bubbling events like enter and leave, but it will not do so when dispatchEvent is called on it with a non-bubbling event. Only Safari, IE, and Chrome implement this monstrosity, and working group seems to agree it should be removed: http://lists.w3.org/Archives/Public/www-svg/2014Jan/0014.html This workaround rewites event.target and relatedTarget to refer to <use> elements and not their "instance trees". Fixes #124
- Loading branch information