From d836a23197823481b7125b608aa2b3b7586dbb2e Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Tue, 11 Jun 2024 13:33:57 +0200 Subject: [PATCH] Revert "Update enforcement for toggleAttribute to match behaviour observed in Chrome." This reverts commit 2f00466aaa9ea9f01aa88dbe779cd1f02ffc437f. --- dom.bs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/dom.bs b/dom.bs index 9f96474c..77905847 100644 --- a/dom.bs +++ b/dom.bs @@ -6971,8 +6971,6 @@ method steps are:

If attribute is null, then:

    -
  1. If force is false, return false. -

  2. Set attribute to an attribute whose local name is qualifiedName, value is the empty string, and node document is this's node document. @@ -6980,20 +6978,12 @@ method steps are:

  3. Let verifiedValue be the result of calling verify attribute value attribute's value for attribute, with this. -

  4. Let existingAttribute be the first attribute in this's - attribute list whose qualified name is qualifiedName, - and null otherwise. - -

  5. If existingAttribute is null: -

      -
    1. Set attribute's value to verifiedValue. - -

    2. Append attribute to this. +

    3. Set attribute's value to verifiedValue. -

    4. Return true. -

    +
  6. If force is not given or is true, then append + this attribute to this, and then return true. -

  7. Set existingAttribute's value to verifiedValue. +

  8. Return false.

  • Otherwise, if force is not given or is false,