Skip to content

Commit ad422be

Browse files
committed
Correct lookupPrefix() after fourteen years
Since it was introduced in 43213ed we never invoked locating a namespace prefix correctly. Fixes #1302.
1 parent 6db6c7d commit ad422be

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

dom.bs

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4902,23 +4902,39 @@ the interface <var>node</var> <a>implements</a>:
49024902

49034903
<dl class=switch>
49044904
<dt>{{Element}}
4905-
<dd><p>Return the result of <a>locating a namespace prefix</a> for it using <var>namespace</var>.
4905+
<dd><p>Return the result of <a>locating a namespace prefix</a> for <a>this</a> using
4906+
<var>namespace</var>.
49064907

49074908
<dt>{{Document}}
4908-
<dd><p>Return the result of <a>locating a namespace prefix</a> for its <a>document element</a>,
4909-
if its <a>document element</a> is non-null; otherwise null.
4909+
<dd>
4910+
<ol>
4911+
<li><p>If <a>this</a>'s <a>document element</a> is null, then return null.
4912+
4913+
<li><p>Return the result of <a>locating a namespace prefix</a> for <a>this</a>'s
4914+
<a>document element</a> using <var>namespace</var>.
4915+
</ol>
49104916

49114917
<dt>{{DocumentType}}
49124918
<dt>{{DocumentFragment}}
49134919
<dd><p>Return null.
49144920

49154921
<dt>{{Attr}}
4916-
<dd><p>Return the result of <a>locating a namespace prefix</a> for its <a for=Attr>element</a>,
4917-
if its <a for=Attr>element</a> is non-null; otherwise null.
4922+
<dd>
4923+
<ol>
4924+
<li><p>If <a>this</a>'s <a for=Attr>element</a> is null, then return null.
4925+
4926+
<li><p>Return the result of <a>locating a namespace prefix</a> for <a>this</a>'s
4927+
<a for=Attr>element</a> using <var>namespace</var>.
4928+
</ol>
49184929

49194930
<dt>Otherwise
4920-
<dd><p>Return the result of <a>locating a namespace prefix</a> for its <a>parent element</a>, if
4921-
its <a>parent element</a> is non-null; otherwise null.
4931+
<dd>
4932+
<ol>
4933+
<li><p>If <a>this</a>'s <a>parent element</a> is null, then return null.
4934+
4935+
<li><p>Return the result of <a>locating a namespace prefix</a> for <a>this</a>'s
4936+
<a>parent element</a> using <var>namespace</var>.
4937+
</ol>
49224938
</dl>
49234939
</ol>
49244940

@@ -10358,6 +10374,7 @@ Cyrille Tuzi,
1035810374
Dan Burzo,
1035910375
Daniel Clark,
1036010376
Daniel Glazman,
10377+
Darien Maillet Valentine<!-- bhathos; GitHub -->,
1036110378
Darin Fisher,
1036210379
David Bruant,
1036310380
David Flanagan,
@@ -10436,7 +10453,7 @@ Manish Tripathi,
1043610453
Marcos Caceres,
1043710454
Mark Miller,
1043810455
Martijn van der Ven,
10439-
Mason Freed,<!-- mfreed7; GitHub -->
10456+
Mason Freed<!-- mfreed7; GitHub -->,
1044010457
Mats Palmgren,
1044110458
Mounir Lamouri,
1044210459
Michael Stramel,
@@ -10493,7 +10510,7 @@ Tobie Langel,
1049310510
Tom Pixley,
1049410511
Travis Leithead,
1049510512
Trevor Rowbotham,
10496-
<i>triple-underscore</i><!--GitHub-->,
10513+
<i>triple-underscore</i><!-- GitHub -->,
1049710514
Tristan Fraipont,
1049810515
Veli Şenol,
1049910516
Vidur Apparao,

0 commit comments

Comments
 (0)