From f8877b612345ca5c1edcd509a2eca428820ffed4 Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Thu, 11 Apr 2024 13:12:42 +0100 Subject: [PATCH] Throw InvalidStateError if the attribute being modified is modified by the default TT policy. --- dom.bs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/dom.bs b/dom.bs index eb48d9a5..afd88500 100644 --- a/dom.bs +++ b/dom.bs @@ -6368,7 +6368,8 @@ given a document, localName, namespace, and opt

To change an -attribute attribute to value, with string sink, run these steps: +attribute attribute to value, with string sink, run these +steps:

  1. Let oldValue be attribute's value.

  2. @@ -6376,8 +6377,12 @@ given a document, localName, namespace, and opt
  3. Validate and set attribute value value for attribute, with attribute's element, and sink. -

  4. Handle attribute changes for attribute with attribute's - element, oldValue, and value. +

  5. If attribute's element has + an attribute attribute, then handle attribute changes for + attribute with attribute's element, oldValue, and + value. + +

  6. Otherwise, throw an "{{InvalidStateError!!exception}}" {{DOMException}}.

To append an @@ -6389,6 +6394,9 @@ string sink (default ""), run these steps: attribute's value for attribute with element, and sink. +

  • If element has an attribute + attribute, then throw an "{{InvalidStateError!!exception}}" {{DOMException}}. +

  • Append attribute to element's attribute list. @@ -6512,7 +6520,11 @@ and a string sink:

  • Validate and set attribute value attr's value for attr with element, and sink. -

  • Replace oldAttr with attr. +

  • If element has an attribute + attr, then replace oldAttr with + attr. + +

  • Otherwise, throw an "{{InvalidStateError!!exception}}" {{DOMException}}.

  • Otherwise, append attr to element