Skip to content

Commit 15e9f57

Browse files
committed
Remove extra algorithm that called through to TT and call TT directly from the various algorithms, also update call signature to match changes in TT.
1 parent 1d25719 commit 15e9f57

File tree

1 file changed

+16
-40
lines changed

1 file changed

+16
-40
lines changed

dom.bs

Lines changed: 16 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6948,14 +6948,6 @@ steps:
69486948
<a for=Attr>value</a>.
69496949
</ol>
69506950

6951-
<p>To <dfn>verify attribute value</dfn> given a {{TrustedType}} or string <var>value</var>, an
6952-
<a>attribute</a> <var>attribute</var>, and an <a for=/>Element</a> <var>element</var>:
6953-
6954-
<ol>
6955-
<li><p>Return the result of calling <a abstract-op>get Trusted Types-compliant attribute value</a>
6956-
given <var>attribute</var>, with <var>element</var>, and <var>value</var>. [[!TRUSTED-TYPES]]
6957-
</ol>
6958-
69596951
<hr>
69606952

69616953
<div algorithm>
@@ -7008,9 +7000,10 @@ string <var>namespace</var> (default null):</p>
70087000
<a for=/>attribute</a> <var>attr</var> and an <a for=/>element</a> <var>element</var>:
70097001

70107002
<ol>
7011-
<li><p>Let <var>verifiedValue</var> be the result of
7012-
<a lt="verify attribute value">verifying an attribute value</a> given <var>attr</var>'s
7013-
<a for=Attr>value</a>, <var>attr</var>, and <var>element</var>.
7003+
<li><p>Let <var>verifiedValue</var> be the result of calling <a abstract-op>get
7004+
Trusted Types-compliant attribute value</a> with <var>attr</var>'s <a for=Attr>local name</a>,
7005+
<var>attr</var>'s <a for=Attr>namespace</a>, <var>element</var>, and <var>attr</var>'s
7006+
<a for=Attr>value</a>. [[!TRUSTED-TYPES]]
70147007

70157008
<li><p>If <var>attr</var>'s <a for=Attr>element</a> is neither null nor <var>element</var>,
70167009
<a>throw</a> an "{{InUseAttributeError!!exception}}" {{DOMException}}.
@@ -7307,19 +7300,11 @@ method steps are:
73077300
<a>HTML document</a>, then set <var>qualifiedName</var> to <var>qualifiedName</var> in
73087301
<a>ASCII lowercase</a>.
73097302

7310-
<li><p>Let <var>attribute</var> be the first <a>attribute</a> in <a>this</a>'s
7311-
<a for=Element>attribute list</a> whose <a for=Attr>qualified name</a> is <var>qualifiedName</var>,
7312-
and null otherwise.
7313-
7314-
<li><p>If <var>attribute</var> is null, then set <var>attribute</var> to an <a>attribute</a>
7315-
whose <a for=Attr>local name</a> is <var>qualifiedName</var>, <a for=Attr>value</a> is
7316-
<var>value</var>, and <a for=Node>node document</a> is <a>this</a>'s <a for=Node>node document</a>.
7317-
7318-
<li><p>Let <var>verifiedValue</var> be the result of
7319-
<a lt="verify attribute value">verifying an attribute value</a> given <var>value</var>,
7320-
<var>attribute</var>, and <a>this</a>.
7303+
<li><p>Let <var>verifiedValue</var> be the result of calling <a abstract-op>get
7304+
Trusted Types-compliant attribute value</a> with <var>qualifiedName</var>, null, <a>this</a>, and
7305+
<var>value</var>. [[!TRUSTED-TYPES]]
73217306

7322-
<li><p>Set <var>attribute</var> to the first <a>attribute</a> in <a>this</a>'s
7307+
<li><p>Let <var>attribute</var> be the first <a>attribute</a> in <a>this</a>'s
73237308
<a for=Element>attribute list</a> whose <a for=Attr>qualified name</a> is <var>qualifiedName</var>,
73247309
and null otherwise.
73257310

@@ -7340,21 +7325,11 @@ method steps are:
73407325
<li><p>Let <var>namespace</var>, <var>prefix</var>, and <var>localName</var> be the result of
73417326
passing <var>namespace</var> and <var>qualifiedName</var> to <a>validate and extract</a>.
73427327

7343-
<li><p>Let <var>attribute</var> be the result of
7344-
<a lt="get an attribute by namespace and local name">getting an attribute</a> given
7345-
<var>namespace</var>, <var>localName</var>, and <var>element</var>.
7346-
7347-
<li><p>If <var>attribute</var> is null, then set attribute to an <a>attribute</a> whose
7348-
<a for=Attr>namespace</a> is <var>namespace</var>, <a for=Attr>namespace prefix</a> is
7349-
<var>prefix</var>, <a for=Attr>local name</a> is <var>localName</var>, <a for=Attr>value</a> is
7350-
<var>value</var>, and <a for=Node>node document</a> is <var>element</var>'s
7351-
<a for=Node>node document</a>.
7352-
7353-
<li><p>Let <var>verifiedValue</var> be the result of
7354-
<a lt="verify attribute value">verifying an attribute value</a> given <var>value</var>,
7355-
<var>attribute</var>, and <var>element</var>.
7328+
<li><p>Let <var>verifiedValue</var> be the result of calling <a abstract-op>get
7329+
Trusted Types-compliant attribute value</a> with <var>localName</var>, <var>namespace</var>,
7330+
<var>element</var>, and <var>value</var>. [[!TRUSTED-TYPES]]
73567331

7357-
<li><p>Set <var>attribute</var> to the result of
7332+
<li><p>Let <var>attribute</var> be the result of
73587333
<a lt="get an attribute by namespace and local name">getting an attribute</a> given
73597334
<var>namespace</var>, <var>localName</var>, and <var>element</var>.
73607335

@@ -7949,9 +7924,10 @@ string <var>value</var>, run these steps:
79497924
<ol>
79507925
<li><p>Let <var>originalElement</var> be <var>attribute</var>'s <a for=Attr>element</a>.
79517926

7952-
<li><p>Let <var>verifiedValue</var> be the result of
7953-
<a lt="verify attribute value">verifying an attribute value</a> given <var>value</var>,
7954-
<var>attribute</var>, and <a>this</a>.
7927+
<li><p>Let <var>verifiedValue</var> be the result of calling <a abstract-op>get
7928+
Trusted Types-compliant attribute value</a> with <var>attribute</var>'s
7929+
<a for=Attr>local name</a>, <var>attribute</var>'s <a for=Attr>namespace</a>, <a>this</a>,
7930+
and <var>value</var>. [[!TRUSTED-TYPES]]
79557931

79567932
<li><p>If <var>attribute</var>'s <a for=Attr>element</a> is null, then set <var>attribute</var>'s
79577933
<a for=Attr>value</a> to <var>verifiedValue</var>, and return.

0 commit comments

Comments
 (0)