@@ -3219,6 +3219,53 @@ e.g., "newURL" and "oldURL".
3219
3219
naming. [[!HTML]]
3220
3220
3221
3221
3222
+ <h3 id=urlhost-class>URLHost class</h3>
3223
+
3224
+ <pre class=idl>
3225
+ [Constructor(USVString host),
3226
+ Exposed=(Window,Worker)]
3227
+ interface URLHost {
3228
+ readonly attribute URLHostType type;
3229
+
3230
+ stringifier USVString toJSON();
3231
+ };
3232
+
3233
+ enum URLHostType { "ipv4", "ipv6", "domain" };</pre>
3234
+
3235
+ <p> Each {{URLHost}} object has an associated <dfn for=URLHost>host</dfn> (a <a for=/>host</a> ).
3236
+
3237
+ <hr>
3238
+
3239
+ <p> The <dfn constructor for=URLHost><code>URLHost(<var>input</var>)</code></dfn> constructor, when
3240
+ invoked, must run these steps:
3241
+
3242
+ <ol>
3243
+ <li><p> Let <var> host</var> be the result of <a>host parsing</a> <var> input</var> with true.
3244
+
3245
+ <li><p> If <var> host</var> is failure, then <a>throw</a> a {{TypeError}} .
3246
+
3247
+ <li><p> Return a new {{URLHost}} object whose <a for=URLHost>host</a> is <var> host</var> .
3248
+ </ol>
3249
+
3250
+ <p> The <dfn attribute for=URLHost><code>type</code></dfn> attribute's getter, must run these steps:
3251
+
3252
+ <ol>
3253
+ <li><p> If <a>this</a> 's <a for=URLHost>host</a> is an <a>IPv4 address</a> , then return
3254
+ "<code> ipv4</code> ".
3255
+
3256
+ <li><p> If <a>this</a> 's <a for=URLHost>host</a> is an <a>IPv6 address</a> , then return
3257
+ "<code> ipv6</code> ".
3258
+
3259
+ <li><p> Assert: <a>this</a> 's <a for=URLHost>host</a> is an <a>domain</a> .
3260
+
3261
+ <li><p> Return "<code> domain</code> ".
3262
+ </ol>
3263
+
3264
+ <p> The <dfn for=URLHost>stringification behavior</dfn> and
3265
+ <dfn method for=URLHost><code>toJSON()</code></dfn> method, when invoked, must return <a>this</a> 's
3266
+ <a for=URLHost>host</a> , <a lt="host serializer">serialized</a> .
3267
+
3268
+
3222
3269
3223
3270
<h2 id=acknowledgments class=no-num>Acknowledgments</h2>
3224
3271
@@ -3317,8 +3364,9 @@ Trevor Rowbotham,
3317
3364
Valentin Gosu,
3318
3365
Vyacheslav Matva,
3319
3366
Wei Wang,
3320
- 山岸和利 (Yamagishi Kazutoshi), and
3321
- 成瀬ゆい (Yui Naruse)
3367
+ 山岸和利 (Yamagishi Kazutoshi),
3368
+ 成瀬ゆい (Yui Naruse), and
3369
+ Zach Lym
3322
3370
for being awesome!
3323
3371
3324
3372
<p> This standard is written by
0 commit comments