diff --git a/spec.bs b/spec.bs index 35a6e5d..843eed0 100644 --- a/spec.bs +++ b/spec.bs @@ -185,44 +185,59 @@ Each {{URLPattern}} object has an associated search componen Each {{URLPattern}} object has an associated hash component, a [=component=], which must be set upon creation.
-
{{URLPattern}} . {{URLPattern/protocol}} +
|urlPattern| = new {{URLPattern/constructor(input, baseURL)|URLPattern}}(|input|, |baseURL|)
+
+ 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. +
+ +
|matches| = |urlPattern|.{{URLPattern/test(input, baseURL)|test}}(|input|, |baseURL|)
+
+ 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. +
+ +
|result| = |urlPattern|.{{URLPattern/exec(input, baseURL)|exec}}(|input|, |baseURL|)
+
+ 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|. +
+ +
|urlPattern|.{{URLPattern/protocol}}
-

The normalized protocol pattern string. +

Returns |urlPattern|'s normalized protocol pattern string.

-
{{URLPattern}} . {{URLPattern/username}} +
|urlPattern|.{{URLPattern/username}}
-

The normalized username pattern string. +

Returns |urlPattern|'s normalized username pattern string.

-
{{URLPattern}} . {{URLPattern/password}} +
|urlPattern|.{{URLPattern/password}}
-

The normalized password pattern string. +

Returns |urlPattern|'s normalized password pattern string.

-
{{URLPattern}} . {{URLPattern/hostname}} +
|urlPattern|.{{URLPattern/hostname}}
-

The normalized hostname pattern string. +

Returns |urlPattern|'s normalized hostname pattern string.

-
{{URLPattern}} . {{URLPattern/port}} +
|urlPattern|.{{URLPattern/port}}
-

The normalized port pattern string. +

Returns |urlPattern|'s normalized port pattern string.

-
{{URLPattern}} . {{URLPattern/pathname}} +
|urlPattern|.{{URLPattern/pathname}}
-

The normalized pathname pattern string. +

Returns |urlPattern|'s normalized pathname pattern string.

-
{{URLPattern}} . {{URLPattern/search}} +
|urlPattern|.{{URLPattern/search}}
-

The normalized search pattern string. +

Returns |urlPattern|'s normalized search pattern string.

-
{{URLPattern}} . {{URLPattern/hash}} +
|urlPattern|.{{URLPattern/hash}}
-

The normalized hash pattern string. +

Returns |urlPattern|'s normalized hash pattern string.