Skip to content

Commit

Permalink
Update createNSResolver and lookupNamespaceURI()
Browse files Browse the repository at this point in the history
Fixes #857
  • Loading branch information
tkent-google committed Feb 21, 2023
1 parent d34d52d commit b484810
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4589,6 +4589,9 @@ the interface <var>node</var> <a>implements</a>:
<dt>{{Element}}
<dd>
<ol>
<li><p>If <var>prefix</var> is "<code>xml</code>", then return <a>XML namespace</a>.
<li><p>If <var>prefix</var> is "<code>xmlns</code>", then return <a>XMLNS namespace</a>.

<li><p>If its <a for=Element>namespace</a> is non-null and its
<a for=Element>namespace prefix</a> is <var>prefix</var>, then return
<a for=Element>namespace</a>.
Expand Down Expand Up @@ -9849,13 +9852,22 @@ callback interface XPathNSResolver {

interface mixin XPathEvaluatorBase {
[NewObject] XPathExpression createExpression(DOMString expression, optional XPathNSResolver? resolver = null);
XPathNSResolver createNSResolver(Node nodeResolver);
Node createNSResolver(Node nodeResolver);
// XPathResult.ANY_TYPE = 0
XPathResult evaluate(DOMString expression, Node contextNode, optional XPathNSResolver? resolver = null, optional unsigned short type = 0, optional XPathResult? result = null);
};
Document includes XPathEvaluatorBase;
</pre>

<dl class=domintro>
<dt><code><var ignore>evaluator</var> . {{XPathEvaluatorBase/createNSResolver(nodeResolver)}}</code>
<dd><p>Returns the specified <var>nodeResolver</var> as is.
</dl>

<p>The
<dfn method for="XPathEvaluatorBase"><code>createNSResolver(<var>nodeResolver</var>)</code></dfn>
method returns the specified <var>nodeResolver</var> without any side effects. This method exists only
for a historical reason.</p>

<h3 id=interface-xpathevaluator>Interface {{XPathEvaluator}}</h3>

Expand Down

0 comments on commit b484810

Please sign in to comment.