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

关于selection.property - 设置或获取行内属性 #87

Open
ckinmind opened this issue May 29, 2018 · 0 comments
Open

关于selection.property - 设置或获取行内属性 #87

ckinmind opened this issue May 29, 2018 · 0 comments
Labels

Comments

@ckinmind
Copy link
Owner

ckinmind commented May 29, 2018

待测试和补完demo

在这个demo里看到这个api用法


经测试似乎这个api是为了获取某些特殊hmtl的属性用的, 获取普通svg元素并不能取到属性,上面demo的列子也是为了获取select中的value值,官方api描述这么说

Some HTML elements have special properties that are not addressable using attributes or styles, such as a form field’s text value and a checkbox’s checked boolean. Use this method to get or set these properties

所以这个api的应用范围很狭窄,获取svg元素属性应该用selection.attr()这个api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant