Skip to content

Commit

Permalink
Correct lookupPrefix() after fourteen years
Browse files Browse the repository at this point in the history
Since it was introduced in 43213ed we never invoked locating a namespace prefix correctly.

Fixes #1302.
  • Loading branch information
annevk committed Aug 13, 2024
1 parent 809bfa2 commit e8e6516
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4899,23 +4899,39 @@ the interface <var>node</var> <a>implements</a>:

<dl class=switch>
<dt>{{Element}}
<dd><p>Return the result of <a>locating a namespace prefix</a> for it using <var>namespace</var>.
<dd><p>Return the result of <a>locating a namespace prefix</a> for <a>this</a> using
<var>namespace</var>.

<dt>{{Document}}
<dd><p>Return the result of <a>locating a namespace prefix</a> for its <a>document element</a>,
if its <a>document element</a> is non-null; otherwise null.
<dd>
<ol>
<li><p>If <a>this</a>'s <a>document element</a> is null, then return null.

<li><p>Return the result of <a>locating a namespace prefix</a> for <a>this</a>'s
<a>document element</a> using <var>namespace</var>.
</ol>

<dt>{{DocumentType}}
<dt>{{DocumentFragment}}
<dd><p>Return null.

<dt>{{Attr}}
<dd><p>Return the result of <a>locating a namespace prefix</a> for its <a for=Attr>element</a>,
if its <a for=Attr>element</a> is non-null; otherwise null.
<dd>
<ol>
<li><p>If <a>this</a>'s <a for=Attr>element</a> is null, then return null.

<li><p>Return the result of <a>locating a namespace prefix</a> for <a>this</a>'s
<a for=Attr>element</a> using <var>namespace</var>.
</ol>

<dt>Otherwise
<dd><p>Return the result of <a>locating a namespace prefix</a> for its <a>parent element</a>, if
its <a>parent element</a> is non-null; otherwise null.
<dd>
<ol>
<li><p>If <a>this</a>'s <a>parent element</a> is null, then return null.

<li><p>Return the result of <a>locating a namespace prefix</a> for <a>this</a>'s
<a>parent element</a> using <var>namespace</var>.
</ol>
</dl>
</ol>

Expand Down Expand Up @@ -10355,6 +10371,7 @@ Cyrille Tuzi,
Dan Burzo,
Daniel Clark,
Daniel Glazman,
Darien Maillet Valentine<!-- bhathos; GitHub -->,
Darin Fisher,
David Bruant,
David Flanagan,
Expand Down Expand Up @@ -10432,7 +10449,7 @@ Manish Tripathi,
Marcos Caceres,
Mark Miller,
Martijn van der Ven,
Mason Freed,<!-- mfreed7; GitHub -->
Mason Freed<!-- mfreed7; GitHub -->,
Mats Palmgren,
Mounir Lamouri,
Michael Stramel,
Expand Down Expand Up @@ -10489,7 +10506,7 @@ Tobie Langel,
Tom Pixley,
Travis Leithead,
Trevor Rowbotham,
<i>triple-underscore</i><!--GitHub-->,
<i>triple-underscore</i><!-- GitHub -->,
Tristan Fraipont,
Veli Şenol,
Vidur Apparao,
Expand Down

0 comments on commit e8e6516

Please sign in to comment.