From e7714581d70c46e66cdd0613f9b82c25a01fd55a Mon Sep 17 00:00:00 2001 From: Psychpsyo <60073468+Psychpsyo@users.noreply.github.com> Date: Mon, 16 Sep 2024 22:22:55 +0200 Subject: [PATCH] Add class as an alias for className 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. fixes #1310 --- dom.bs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dom.bs b/dom.bs index e493352d..d946f33c 100644 --- a/dom.bs +++ b/dom.bs @@ -6172,7 +6172,8 @@ interface Element : Node { readonly attribute DOMString tagName; [CEReactions] attribute DOMString id; - [CEReactions] attribute DOMString className; + [CEReactions] attribute DOMString class; + [CEReactions] attribute DOMString className; // legacy alias of .class [SameObject, PutForwards=value] readonly attribute DOMTokenList classList; [CEReactions, Unscopable] attribute DOMString slot; @@ -6786,8 +6787,8 @@ claims as to whether using them is conforming or not.

The id attribute must reflect "id". -

The className attribute must -reflect "class". +

The class and className attribute must reflect "class".

The classList getter steps are to return a {{DOMTokenList}} object whose associated element is this and whose associated @@ -10506,6 +10507,7 @@ Philippe Le Hégaret, Piers Wombwell, Pierre-Marie Dartus, prosody—Gab Vereable Context(, +Psychpsyo, Rafael Weinstein, Rakina Zata Amni, Richard Bradshaw,