From 3ef8c7419a2bbcfa0f028a8db521bfc567f8a002 Mon Sep 17 00:00:00 2001
From: Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
Date: Mon, 16 Sep 2024 21:57:58 +0200
Subject: [PATCH 1/2] Add htmlFor and className aliases

This adds for as an alias for htmlFor to be
more consistent and intuitive. This is now possible
since 'for' is no longer a globally reserved word
in Javascript.
It also updates one example to match the new
'class' alias for 'className' from the DOM spec.

fixes #9379
---
 source | 27 +++++++++++++++++----------
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/source b/source
index e8c4389d51c..cb9984cef5c 100644
--- a/source
+++ b/source
@@ -46242,7 +46242,8 @@ interface <dfn interface>HTMLLabelElement</dfn> : <span>HTMLElement</span> {
   [<span>HTMLConstructor</span>] constructor();
 
   readonly attribute <span>HTMLFormElement</span>? <span data-x="dom-label-form">form</span>;
-  [<span>CEReactions</span>] attribute DOMString <span data-x="dom-label-htmlFor">htmlFor</span>;
+  [<span>CEReactions</span>] attribute DOMString <span data-x="dom-label-for">for</span>;
+  [<span>CEReactions</span>] attribute DOMString <span data-x="dom-label-htmlFor">htmlFor</span>; // legacy alias of .for
   readonly attribute <span>HTMLElement</span>? <span data-x="dom-label-control">control</span>;
 };</code></pre>
    </dd>
@@ -46348,8 +46349,9 @@ interface <dfn interface>HTMLLabelElement</dfn> : <span>HTMLElement</span> {
 
   <div w-nodev>
 
-  <p>The <dfn attribute for="HTMLLabelElement"><code data-x="dom-label-htmlFor">htmlFor</code></dfn>
-  IDL attribute must <span>reflect</span> the <code data-x="attr-label-for">for</code> content
+  <p>The <dfn attribute for="HTMLLabelElement"><code data-x="dom-label-for">for</code></dfn> and
+  <dfn attribute for="HTMLLabelElement"><code data-x="dom-label-htmlFor">htmlFor</code></dfn>
+  IDL attributes must <span>reflect</span> the <code data-x="attr-label-for">for</code> content
   attribute.</p>
 
   <p>The <dfn attribute for="HTMLLabelElement"><code data-x="dom-label-control">control</code></dfn>
@@ -54870,7 +54872,8 @@ Daddy">&lt;/textarea></code></pre>
 interface <dfn interface>HTMLOutputElement</dfn> : <span>HTMLElement</span> {
   [<span>HTMLConstructor</span>] constructor();
 
-  [SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-output-htmlFor">htmlFor</span>;
+  [SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-output-for">for</span>;
+  [SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-output-htmlFor">htmlFor</span>; // legacy alias of .for
   readonly attribute <span>HTMLFormElement</span>? <span data-x="dom-fae-form">form</span>;
   [<span>CEReactions</span>] attribute DOMString <span data-x="dom-fe-name">name</span>;
 
@@ -54993,7 +54996,8 @@ interface <dfn interface>HTMLOutputElement</dfn> : <span>HTMLElement</span> {
   getter steps are to return "<code data-x="">output</code>".</p>
 
   <p>The <dfn attribute for="HTMLOutputElement"><code
-  data-x="dom-output-htmlFor">htmlFor</code></dfn> IDL attribute must <span>reflect</span> the <code
+  data-x="dom-output-for">for</code></dfn> and <dfn attribute for="HTMLOutputElement"><code
+  data-x="dom-output-htmlFor">htmlFor</code></dfn> IDL attributes must <span>reflect</span> the <code
   data-x="attr-output-for">for</code> content attribute.</p>
 
   <p>The <code data-x="dom-cva-willValidate">willValidate</code>, <code
@@ -92001,11 +92005,11 @@ for (const entry of navigation.entries()) {
   const li = document.createElement("li");
 
   if (entry.index &lt; navigation.currentEntry.index) {
-    li.className = "backward";
+    li.class = "backward";
   } else if (entry.index > navigation.currentEntry.index) {
-    li.className = "forward";
+    li.class = "forward";
   } else {
-    li.className = "current";
+    li.class = "current";
   }
 
   li.textContent = entry.url;
@@ -137923,7 +137927,8 @@ interface <dfn interface>HTMLParamElement</dfn> : <span>HTMLElement</span> {
   <pre><code class="idl">partial interface <span id="HTMLScriptElement-partial">HTMLScriptElement</span> {
   [<span>CEReactions</span>] attribute DOMString <span data-x="dom-script-charset">charset</span>;
   [<span>CEReactions</span>] attribute DOMString <span data-x="dom-script-event">event</span>;
-  [<span>CEReactions</span>] attribute DOMString <span data-x="dom-script-htmlFor">htmlFor</span>;
+  [<span>CEReactions</span>] attribute DOMString <span data-x="dom-script-for">for</span>;
+  [<span>CEReactions</span>] attribute DOMString <span data-x="dom-script-htmlFor">htmlFor</span>; // legacy alias of .for
 };</code></pre>
 
   <p>The <dfn attribute for="HTMLScriptElement"><code
@@ -137932,7 +137937,8 @@ interface <dfn interface>HTMLParamElement</dfn> : <span>HTMLElement</span> {
   must <span>reflect</span> the respective content attributes of the same name.</p>
 
   <p>The <dfn attribute for="HTMLScriptElement"><code
-  data-x="dom-script-htmlFor">htmlFor</code></dfn> IDL attribute of the <code>script</code> element
+  data-x="dom-script-for">for</code></dfn> and <dfn attribute for="HTMLScriptElement"><code
+  data-x="dom-script-htmlFor">htmlFor</code></dfn> IDL attributes of the <code>script</code> element
   must <span>reflect</span> the element's <code data-x="attr-script-for">for</code> content
   attribute.</p>
 
@@ -144905,6 +144911,7 @@ INSERT INTERFACES HERE
   Prateek Rungta,
   Pravir Gupta,
   Prayag Verma,
+  Psychpsyo,
   &#x674e;&#x666e;&#x541b; (Pujun Li)<!-- masa jack -->,
   Rachid Finge,
   Rafael Weinstein,

From 85ee34b0c47ae57d70b4e20acf41507ece5c28b7 Mon Sep 17 00:00:00 2001
From: Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
Date: Tue, 17 Sep 2024 14:40:30 +0200
Subject: [PATCH 2/2] Remove 'for' IDL attribute from script

---
 source | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/source b/source
index cb9984cef5c..fe15e91ca2a 100644
--- a/source
+++ b/source
@@ -137927,8 +137927,7 @@ interface <dfn interface>HTMLParamElement</dfn> : <span>HTMLElement</span> {
   <pre><code class="idl">partial interface <span id="HTMLScriptElement-partial">HTMLScriptElement</span> {
   [<span>CEReactions</span>] attribute DOMString <span data-x="dom-script-charset">charset</span>;
   [<span>CEReactions</span>] attribute DOMString <span data-x="dom-script-event">event</span>;
-  [<span>CEReactions</span>] attribute DOMString <span data-x="dom-script-for">for</span>;
-  [<span>CEReactions</span>] attribute DOMString <span data-x="dom-script-htmlFor">htmlFor</span>; // legacy alias of .for
+  [<span>CEReactions</span>] attribute DOMString <span data-x="dom-script-htmlFor">htmlFor</span>;
 };</code></pre>
 
   <p>The <dfn attribute for="HTMLScriptElement"><code
@@ -137937,8 +137936,7 @@ interface <dfn interface>HTMLParamElement</dfn> : <span>HTMLElement</span> {
   must <span>reflect</span> the respective content attributes of the same name.</p>
 
   <p>The <dfn attribute for="HTMLScriptElement"><code
-  data-x="dom-script-for">for</code></dfn> and <dfn attribute for="HTMLScriptElement"><code
-  data-x="dom-script-htmlFor">htmlFor</code></dfn> IDL attributes of the <code>script</code> element
+  data-x="dom-script-htmlFor">htmlFor</code></dfn> IDL attribute of the <code>script</code> element
   must <span>reflect</span> the element's <code data-x="attr-script-for">for</code> content
   attribute.</p>