You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, to access the class attribute of an element in Javascript, you need to use element.className instead of just element.class.
This is unintuitive and inconsistent with other attributes, and there is little reason for it because class is no longer a reserved word.
Note:
This is just to mirror issue #9379 in the HTML repo.
See it for more details and discussion.
The text was updated successfully, but these errors were encountered:
This adds class as an alias for className to be
more consistent and intuitive. This is now possible
since 'class' is no longer a globally reserved word
in Javascript.
fixeswhatwg#1310
What is the issue with the DOM Standard?
Currently, to access the
class
attribute of an element in Javascript, you need to useelement.className
instead of justelement.class
.This is unintuitive and inconsistent with other attributes, and there is little reason for it because
class
is no longer a reserved word.Note:
This is just to mirror issue #9379 in the HTML repo.
See it for more details and discussion.
The text was updated successfully, but these errors were encountered: