targetElement

SVGAnimationElement.targetElement属性是指完成动画的元素。如果没有目标元素在执行动画(例如:因为 href属性指定了一个未知的元素 ),这个值将返回null

语法

var targetElement = someElement.targetElement;

技术规范

技术规范 状态 注释
SVG Animations Level 2
SVGAnimationElement.targetElement
Editor's Draft

添加null作为没有目标元素执行动画时的返回值。

Scalable Vector Graphics (SVG) 1.1 (Second Edition)
SVGAnimationElement.targetElement
Recommendation 初始定义

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
targetElementChrome Full support YesEdge No support NoFirefox Full support YesIE No support NoOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown