Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在获取 SVGImageElement 元素的宽和高时,属性取值报错 #170

Open
GuoSirius opened this issue Sep 2, 2019 · 0 comments · May be fixed by #171
Open

在获取 SVGImageElement 元素的宽和高时,属性取值报错 #170

GuoSirius opened this issue Sep 2, 2019 · 0 comments · May be fixed by #171

Comments

@GuoSirius
Copy link

GuoSirius commented Sep 2, 2019

image

image

https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedLength

由于 SVGImageElement 的宽高属性并不是一个 Number 类型的值,而是一个 SVGAnimatedLength 类型,所以取值不能直接 获取 img.width

@GuoSirius GuoSirius linked a pull request Sep 2, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant