-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
getAttribute -> getDefinedAttribute, getComputedAttribute -> getAttribute (fixes #1590) #1925
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
Conversation
|
I like To me |
|
I like
|
|
What about |
|
They're actually not bad, the only confusion is when you do |
|
Kk, all fine with me. |
|
I still think |
|
updated |
Latest aframe (`master`) deprecated `getComputedAttribute`, and replaced it with the more intuitive `getAttribute`. More info: aframevr/aframe#1925
Latest aframe (`master`) deprecated `getComputedAttribute`, and replaced it with the more intuitive `getAttribute`. More info: aframevr/aframe#1925
Latest aframe (`master`) deprecated `getComputedAttribute`, and replaced it with the more intuitive `getAttribute`. More info: aframevr/aframe#1925
Description:
I'd expect that
getAttributereturns full component data. 99% of the time we're grabbing component data, we want the computed component data, not just what is defined in the attribute. Since everyone knows DOM'sgetAttributerather than A-Frame'sgetComputedAttribute, this is the method they'll reach for first. SincegetAttributecurrently returns only defined data, it is confusing whenel.getAttribute('position')returnsnull.Changes proposed:
getAttributeis now an explicitgetDefinedAttributegetComputedAttributeis nowgetAttribute