From 1ec907b8b68ea5e1a770b199255ad636c0594e14 Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Thu, 13 Jun 2024 17:21:58 +0200 Subject: [PATCH] Add verify flag to set an attribute value that is default false and true from setAttributeNS to fix issue with current spec --- dom.bs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/dom.bs b/dom.bs index 6b0b76a0..3d760ce0 100644 --- a/dom.bs +++ b/dom.bs @@ -6546,8 +6546,9 @@ string namespace (default null):

To set an attribute value given an element element, a string localName, a string or {{TrustedType}} -value, an optional null or string prefix (default null), and an optional null -or string namespace (default null): +value, an optional null or string prefix (default null), an optional null +or string namespace (default null), and an optional boolean verify +(default false):

  1. Let attribute be the result of @@ -6562,11 +6563,17 @@ or string namespace (default null): value, and node document is element's node document. -
  2. Let verifiedValue be the result of calling verify attribute value - value for attribute, with element. +

  3. Let verifiedValue be value. + +

  4. If verify is true: +

      +
    1. Set verifiedValue to the result of calling verify attribute value + value for attribute, with element. -

    2. Set attributeExists to true if element has - an attribute attribute; otherwise false. +

    3. Set attributeExists to true if element has + an attribute attribute; otherwise false. +

    +
  5. If attributeExists is true, change attribute to verifiedValue. @@ -6872,7 +6879,7 @@ method steps are: passing namespace and qualifiedName to validate and extract.

  6. Set an attribute value for this using localName, value, - and also prefix and namespace. + prefix, namespace and true.

The