* 仕様書

[REFS[
- [26] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-03-14 22:44:13 +09:00]] 版) <https://html.spec.whatwg.org/#the-location-interface>
]REFS]

* 文脈

[FIG(short list)[ [45] 
- [CODE(HTMLe)@en[a]]
- [CODE(HTMLe)@en[area]]
- [CODE(DOMi)@en[Location]]
- [CODE(DOMi)@en[WorkerLocation]]
- [CODE(DOMi)@en[URL][URL API]]
]FIG]

* [CODE(DOMi)@en[URL][URL API]]

@@ [CODE(DOMi)@en[URL][URL API]]

* [CODE(DOMi)@en[HTMLHyperlinkElementUtils]]

@@ [CODE[HTMLHyperlinkElementUtils]]

* [CODE(DOMi)@en[Location][Location (DOM)]]

[27] 次の[[メンバー]]が存在します [SRC[>>26]]。
[FIG(short list)[
- [CODE(DOMa)@en[href][location.href]]
- [CODE(DOMa)@en[origin][location.origin]]
- [CODE(DOMa)@en[protocol][location.protocol]]
- [CODE(DOMa)@en[host][location.host]]
- [CODE(DOMa)@en[hostname][location.hostname]]
- [CODE(DOMa)@en[port][location.port]]
- [CODE(DOMa)@en[pathname][location.pathname]]
- [CODE(DOMa)@en[search][location.search]]
- [CODE(DOMa)@en[hash][location.hash]]
]FIG]

[28] [CODE(DOMa)@en[origin]] は[[読み取り専用]]、それ以外は読み書き両用です [SRC[>>26]]。

[25] [CODE(DOMi)@en[Location][Location (DOM)]] の各[[メンバー]]には
[CODE(IDL)@en[Unforgeable]] [[拡張属性]]が指定されています [SRC[>>26]]。

* 文字列化

[44] [[文字列化]]すると、 [CODE(DOMa)@en[href]] [[属性]]の[[取得器]]が返す値が得られます。

* 歴史

[1] [CITE@en[Web Applications 1.0 r7710 Integrate with URL standard.]]
( ([TIME[2013-02-09 11:07:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7709&to=7710>

[2] [CITE@en[Web Applications 1.0 r7795 Update integration with URL spec.]]
( ([TIME[2013-04-10 03:18:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7794&to=7795>

[3] [CITE@en[Web Applications 1.0 r7908 Update to match recent URL spec changes (this fixes a.href/area.href, but note that this breaks Location.href instead; see the bug for details)]]
( ([TIME[2013-06-06 05:26:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7907&to=7908>

[4] [CITE@en[Make it possible to unset a url/input https://www.w3.org/Bugs/Public/sho... · ac1df21 · whatwg/url]]
( ([TIME[2014-10-19 00:59:32 +09:00]] 版))
<https://github.com/whatwg/url/commit/ac1df219c1d5b9381eca43ec432d4103c2505eac>

[5] [CITE@en[Web Applications 1.0 r8858  removing an href='' attribute affects URLUtils differently than setting it to ''.]]
( ([TIME[2014-11-27 05:39:00 +09:00]] 版))
<https://html5.org/r/8858>

[6] [CITE@ja[IE で a 要素を使って相対 URL からスキームを得る: Days on the Moon]]
( ([TIME[2015-01-01 15:00:40 +09:00]] 版))
<http://nanto.asablo.jp/blog/2014/11/09/7487263>

[7] [CITE@en[Put searchParams on its own interface for now due to trouble with Loc… · whatwg/url@3a5e808]]
([TIME[2015-06-16 15:01:15 +09:00]] 版)
<https://github.com/whatwg/url/commit/3a5e8086aff2fe3baa57fcebd1795a16de4f5d16>

[8] [CITE@en[1105677 – location.searchParams is missing]]
([TIME[2015-06-16 15:02:51 +09:00]] 版)
<https://bugzilla.mozilla.org/show_bug.cgi?id=1105677>

[9] [CITE@en[Bug 27596 – Need a better story for searchParams and URLSearchParams]]
([TIME[2015-06-16 15:03:17 +09:00]] 版)
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=27596>

[10] [CITE@en[Make URLUtils : URLSearchParams a 1:1 mapping. And also reset URLUtil… · whatwg/url@0fdcfbc]]
([TIME[2015-08-15 11:37:20 +09:00]] 版)
<https://github.com/whatwg/url/commit/0fdcfbcc58f713d3d804a0cbbe6c1d0cadab2962>

[11] [CITE@en[Point out the issues with URLUtils since it might be a while before I… · whatwg/url@2e36d14]]
([TIME[2015-09-03 14:38:08 +09:00]] 版)
<https://github.com/whatwg/url/commit/2e36d14729657d3411303dd36e2346a2051c51e9>

[12] [CITE@en[Inline URLUtilsReadOnly · whatwg/html@32a7a20]]
([TIME[2015-09-26 11:27:47 +09:00]] 版)
<https://github.com/whatwg/html/commit/32a7a2092eeff52aca78a0224816a9b327893cc6>

[13] [CITE[Add URLUtilsReadOnly for workers. · 59f53a4 · whatwg/url]]
( ([TIME[2013-02-16 12:43:15 +09:00]] 版))
<https://github.com/whatwg/url/commit/59f53a46a0de62867b02d236dcf366efdefabcf2>

[14] [CITE@en[Remove URLUtilsReadOnly · whatwg/url@c287794]]
([TIME[2015-09-26 11:35:00 +09:00]] 版)
<https://github.com/whatwg/url/commit/c2877946857bc904ecb8a5805abc423c82d9da98>

[15] [CITE@en[Inline URLUtils for a and area elements · whatwg/html@bab6591]]
([TIME[2015-10-07 13:38:57 +09:00]] 版)
<https://github.com/whatwg/html/commit/bab659163757d66177270bd4abe74a58f2732008>

[16] [CITE@en[Merge URLUtils into Location · whatwg/html@f0a7365]]
([TIME[2015-10-07 13:58:57 +09:00]] 版)
<https://github.com/whatwg/html/commit/f0a73659b4046cc35a28855f3544dead66345689>

[17] [CITE@en[Now HTML has inlined URLUtils, inline it here too · whatwg/url@4cb6328]]
([TIME[2015-10-13 19:10:06 +09:00]] 版)
<https://github.com/whatwg/url/commit/4cb6328a1cc35c93e306751a0f0c610fa5c800d7>

[18] [CITE@en[Drop ''''''[''''''Exposed=Window'''''']'''''' for HTMLHyperlinkElementUtils · whatwg/html@9b13dfc]]
([TIME[2015-10-31 12:12:01 +09:00]] 版)
<https://github.com/whatwg/html/commit/9b13dfc443a70bcb383e8cb9b6c0a9765b11b680>

[19] [CITE@en[Fix copypasta from "Merge URLUtils into Location" · whatwg/html@676b621]]
([TIME[2015-12-21 11:32:46 +09:00]] 版)
<https://github.com/whatwg/html/commit/676b6211ed8f4da76bf273fb90d250bc20d35606>

[20] [CITE@en[Fix #522: "reinitialise url" has an incorrect guard · whatwg/html@ea7b6e9]]
([TIME[2016-01-21 12:12:18 +09:00]] 版)
<https://github.com/whatwg/html/commit/ea7b6e93abec528009c83442a34942f1eb1d31e9>

[21] [CITE@en[21787 – Setting <area>.href to a relative URL should set the content attribute to the listeral value instead of resolved value, to match browsers and what the spec requires for other reflecting URL attributes ''''''[''''''...'''''']'''''']]
([TIME[2016-01-26 10:45:53 +09:00]] 版)
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=21787#c6>

[22] [CITE@en[Fix #568: avoid setting the url for blob URLs only · whatwg/html@2a1374f]]
([TIME[2016-02-11 12:06:43 +09:00]] 版)
<https://github.com/whatwg/html/commit/2a1374f94fab97392f7af8c3b028fa25b60d70f2>

[23] [CITE@en[URLs are parsed and produce records · whatwg/html@30bc255]]
([TIME[2016-02-14 22:58:04 +09:00]] 版)
<https://github.com/whatwg/html/commit/30bc2557105ad62881ec9670f253febbc9761b44>

[24] [CITE@en[Define security around Window, WindowProxy, and Location properly · whatwg/html@acae3df]]
([TIME[2016-03-13 23:38:42 +09:00]] 版)
<https://github.com/whatwg/html/commit/acae3df652b382e9f4f1d1b4dc7e08e2b00df821>

[29] [CITE@en[Editorial: non-relative flag got renamed · whatwg/html@d360c27]]
([TIME[2016-03-31 12:41:40 +09:00]] 版)
<https://github.com/whatwg/html/commit/d360c27d44c52390441b5910d39e898160ec016d>

[30] [CITE@en[Merge effective script origin into origin · whatwg/html@8a843f2]]
([TIME[2016-03-31 18:01:06 +09:00]] 版)
<https://github.com/whatwg/html/commit/8a843f2169a6864a3024c4329528dccb2051d275>

[31] [CITE@en[Formalize custom element reactions · whatwg/html@27aa7bc]]
([TIME[2016-04-26 18:54:08 +09:00]] 版)
<https://github.com/whatwg/html/commit/27aa7bc4fa6f168654a8c858f0773e611f679b39>

[32] [CITE@en[Use USVString for all URLs]]
( ([[domenic]]著, [TIME[2016-05-20 22:02:29 +09:00]]))
<https://github.com/whatwg/html/commit/018b983b77b2cd908f6d00100e7e0abe893dd2c3>

[33] [CITE@en[Linking: borrow HTML attributes, explicitly allow nested links, cleanup]]
( ([[AmeliaBR]]著, [TIME[2016-06-22 21:54:34 +09:00]]))
<https://github.com/w3c/svgwg/commit/33f85d2bdd20e7d33eedff77b85b10c8451db397>

[34] [CITE@en[Clarify HTMLHyperlinkElementUtils set the url for absent attribute cases]]
([[WillRay]]著, [TIME[2016-07-01 06:30:50 +09:00]])
<https://github.com/whatwg/html/commit/5f1afb970f012661bc8fcb7d61b4b7321f804a25>

[35] [CITE@en[Change URL's port attribute's setter]]
([[SimonSapin]]著, [TIME[2016-10-28 19:12:19 +09:00]])
<https://github.com/whatwg/url/commit/05ffaa644bc3cd4c6694ac6db11a072781af449c>

[36] [CITE@en[URL's href attribute needs to reset URLSearchParams too]]
([[annevk]]著, [TIME[2016-10-19 21:24:41 +09:00]])
<https://github.com/whatwg/url/commit/570a41842fe96d05fc8e4a291bc8974955c650ec>

[37] [CITE@en[Change Location/<a>/<area>'s port setter]]
([[annevk]]著, [TIME[2016-10-28 18:40:28 +09:00]])
<https://github.com/whatwg/html/commit/c62eddef0ee671f362678486f68af6adbb005740>

[38] [CITE@en[303152 - Implement URL spec - chromium - Monorail]]
([TIME[2016-11-02 09:55:39 +09:00]])
<https://bugs.chromium.org/p/chromium/issues/detail?id=303152>

[39] [CITE@en[Return failure in state override scheme parsing]]
([[annevk]]著, [TIME[2017-01-03 23:33:47 +09:00]])
<https://github.com/whatwg/url/commit/4617e33b27d386bbf1db8c04316961d46aaa1397>

[40] [CITE@en[Use "SyntaxError" for location.protocol's setter]]
([[annevk]]著, [TIME[2017-01-05 23:40:38 +09:00]])
<https://github.com/whatwg/html/commit/560f5d1cc4742e98bf08e3b56930820c620ff062>

[41] [CITE@en[Align <a>/<area>.password with the URL Standard]]
([[annevk]]著, [TIME[2017-01-05 23:20:12 +09:00]])
<https://github.com/whatwg/html/commit/165aeecfb1818912219afc50dd2dd1c6ec935ae2>

[42] [CITE@en[Remove javascript URL case from <a>/<area>/Location hash setter]]
([[annevk]]著, [TIME[2017-02-22 15:19:37 +09:00]])
<https://github.com/whatwg/html/commit/deea9fba916cb6e66c7dcfc57442cf25ac0441a1>

[43] [CITE@en[Remove javascript URL special case from the API]]
([[annevk]]著, [TIME[2017-02-16 22:57:09 +09:00]])
<https://github.com/whatwg/url/commit/4bf85a08da18ef367e093426abef776d59e8fb7b>

[46] [CITE@en[Use Web IDL's new-ish interface mixins concept]]
([[romandev]]著, [TIME[2017-12-21 05:39:18 +09:00]])
<https://github.com/whatwg/html/commit/c8867a179c21134021dc3435e98c1b9c4542d794>