Skip to content

Commit

Permalink
Update the domintro section. (Fixes #76)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanderview committed Aug 12, 2021
1 parent ac79186 commit ebdbc1c
Showing 1 changed file with 31 additions and 16 deletions.
47 changes: 31 additions & 16 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -185,44 +185,59 @@ Each {{URLPattern}} object has an associated <dfn for=URLPattern>search componen
Each {{URLPattern}} object has an associated <dfn for=URLPattern>hash component</dfn>, a [=component=], which must be set upon creation.

<dl class="domintro non-normative">
<dt><code>{{URLPattern}} . {{URLPattern/protocol}}</code>
<dt><code>|urlPattern| = new {{URLPattern/constructor(input, baseURL)|URLPattern}}(|input|, |baseURL|)</code></dt>
<dd class=allow-2119>
Constructs a new URLPattern object. The |input| may be a {{URLPatternInit}} dictionary or a string. If |input| is a string, then an optional |baseURL| string may also be provided.
</dd>

<dt><code>|matches| = |urlPattern|.{{URLPattern/test(input, baseURL)|test}}(|input|, |baseURL|)</code></dt>
<dd class=allow-2119>
Tests if |urlPattern| matches the given arguments. The |input| may be a {{URLPatternInit}} dictionary or a string. If |input| is a string, then an optional |baseURL| string may also be provided. The returned |matches| value is a boolean.
</dd>

<dt><code>|result| = |urlPattern|.{{URLPattern/exec(input, baseURL)|exec}}(|input|, |baseURL|)</code></dt>
<dd class=allow-2119>
Executes the |urlPattern| against the given arguments. The |input| may be a {{URLPatternInit}} dictionary or a string. If |input| is a string, then an optional |baseURL| string may also be provided. If the arguments did not match the |urlPattern|, then |result| will be null. If the arguments did match, then |result| will be a {{URLPatternResult}} providing details about values that matched groups within |urlPattern|.
</dd>

<dt><code>|urlPattern|.{{URLPattern/protocol}}</code></dt>
<dd>
<p>The normalized protocol pattern string.
<p>Returns |urlPattern|'s normalized protocol pattern string.
</dd>

<dt><code>{{URLPattern}} . {{URLPattern/username}}</code>
<dt><code>|urlPattern|.{{URLPattern/username}}</code></dt>
<dd>
<p>The normalized username pattern string.
<p>Returns |urlPattern|'s normalized username pattern string.
</dd>

<dt><code>{{URLPattern}} . {{URLPattern/password}}</code>
<dt><code>|urlPattern|.{{URLPattern/password}}</code></dt>
<dd>
<p>The normalized password pattern string.
<p>Returns |urlPattern|'s normalized password pattern string.
</dd>

<dt><code>{{URLPattern}} . {{URLPattern/hostname}}</code>
<dt><code>|urlPattern|.{{URLPattern/hostname}}</code></dt>
<dd>
<p>The normalized hostname pattern string.
<p>Returns |urlPattern|'s normalized hostname pattern string.
</dd>

<dt><code>{{URLPattern}} . {{URLPattern/port}}</code>
<dt><code>|urlPattern|.{{URLPattern/port}}</code></dt>
<dd>
<p>The normalized port pattern string.
<p>Returns |urlPattern|'s normalized port pattern string.
</dd>

<dt><code>{{URLPattern}} . {{URLPattern/pathname}}</code>
<dt><code>|urlPattern|.{{URLPattern/pathname}}</code></dt>
<dd>
<p>The normalized pathname pattern string.
<p>Returns |urlPattern|'s normalized pathname pattern string.
</dd>

<dt><code>{{URLPattern}} . {{URLPattern/search}}</code>
<dt><code>|urlPattern|.{{URLPattern/search}}</code></dt>
<dd>
<p>The normalized search pattern string.
<p>Returns |urlPattern|'s normalized search pattern string.
</dd>

<dt><code>{{URLPattern}} . {{URLPattern/hash}}</code>
<dt><code>|urlPattern|.{{URLPattern/hash}}</code></dt>
<dd>
<p>The normalized hash pattern string.
<p>Returns |urlPattern|'s normalized hash pattern string.
</dd>
</dl>

Expand Down

0 comments on commit ebdbc1c

Please sign in to comment.