/
902.txt
116 lines (83 loc) · 4.32 KB
/
902.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
[3] [DFN[[CODE(DOMi)@en[[[URL]]]]]] [[インターフェイス]]は、
[[URL]] に関する操作を提供するものです。
* 仕様書
[REFS[
- [5] [CITE[File API]] ([TIME[2015-04-17 16:25:21 +09:00]] 版) <https://w3c.github.io/FileAPI/#creating-revoking>
]REFS]
* [CODE(DOMi)@en[URL]] インターフェイスオブジェクト
[4] [CODE(DOMi)@en[[[URL]]]] [[インターフェイスオブジェクト]]
([CODE(JS)@en[window.URL]]) には、次のメンバーが存在します。
[FIG(list short)[
- [CODE(DOMm)@en[[[createObjectURL]]]]
- [CODE(DOMm)@en[[[revokeObjectURL]]]]
- [CODE(JS)@en[[[prototype]]]]
[HISTORY[
- [CODE(DOMm)@en[[[createFor]]]]
- [CODE(DOMm)@en[domainToASCII]]
- [CODE(DOMm)@en[domainToUnicode]]
]HISTORY]
]FIG]
[16]
[[歴史的理由]]により、 [CODE(DOMi)@en[URL]] [[インターフェイスオブジェクト]]は
[DFN[[CODE(DOMi)@en[webkitURL]]]] という名前も持っています [SRC[URL Standard]]。
[HISTORY[
[7] [[File API]] の規定する [[Blob URL]] に関する[[静的メソッド]]を実装し、
[[URL Standard]] の規定する [[URL API]] は実装しない場合は、
[CODE(DOMi)@en[[[URL]]]] [[インターフェイスオブジェクト]]の
[CODE(JS)@en[[[prototype]]]] [[特性]]を晒しては[['''なりません''']] [SRC[>>5]]。
[8] [[API]] が規定された歴史的順序より、このような制約があります。
現在となっては [[URL API]] を実装しないのは[[Web互換]]ではありません。
]HISTORY]
* URL オブジェクト
[11] [[API]] は [CODE[URLUtils]] を参照。
* テストケース
[6] デモ:
[REFS[
- [79] [CITE[Index of /~wakaba/-temp/test/dom/url]] ([TIME[2011-09-19 11:09:05 +09:00]] 版) <http://suika.fam.cx/~wakaba/-temp/test/dom/url/>
]REFS]
* 歴史
** File API
@@
** URL API
[72] [CITE@en[A URL API]]
( ([[Adam Barth]] 著, [TIME[2010-09-18 03:05:30 +09:00]] 版))
<http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/0914.html>
;; Cache: <http://suika.fam.cx/gate/2007/schema/schema/61003c0bdb8a84a529665b22e729f532/prop.html>
[76] [CITE@en-US[URLAPI: Summary]]
( ([TIME[2011-09-19 00:05:33 +09:00]] 版))
<http://dvcs.w3.org/hg/URLAPI/>
[77] [CITE@en-US[URL API]]
( ([TIME[2011-09-19 00:06:07 +09:00]] 版))
<http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html>
** URL Standard
@@
[78] [CITE[IRC logs: freenode / #whatwg / 20110916]]
( ([TIME[2011-09-18 19:30:04 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20110916>
[80] [CITE@en[Web Applications 1.0 r6745 Kill Location.resolveURL() in favour of the new URL() API.]]
( ([TIME[2011-10-25 09:23:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=6744&to=6745>
[1] [CITE@en[''''''[''''''whatwg'''''']'''''' Outstanding URL bugs]]
([[Anne van Kesteren]] 著, [TIME[2015-05-05 16:25:08 +09:00]] 版)
<https://lists.w3.org/Archives/Public/public-whatwg-archive/2015May/0007.html>
[2] [CITE@en[Stop defaulting to about:blank as that might be wrong going forward. · whatwg/url@c2980ee]]
([TIME[2015-05-06 16:31:01 +09:00]] 版)
<https://github.com/whatwg/url/commit/c2980ee398de9621b0c313e5cc522895227db24c>
[9] [CITE@en[Make the Blob URL creating/revoking methods not be exposed on the ser… · w3c/FileAPI@b9c2275]]
([TIME[2016-04-16 15:33:20 +09:00]] 版)
<https://github.com/w3c/FileAPI/commit/b9c2275df53cf3a808f1f272f3d6134d1b920549>
[10] [CITE@en[303152 - Implement URL spec - chromium - Monorail]]
([TIME[2016-11-02 09:55:49 +09:00]])
<https://bugs.chromium.org/p/chromium/issues/detail?id=303152>
[12] [CITE@en[Define URL's toJSON()]]
([[annevk]]著, [TIME[2017-02-08 18:20:34 +09:00]])
<https://github.com/whatwg/url/commit/7dcfe5b5d766fd092b8ce09b6ab47ab2cb2a13f5>
[13] [CITE@en[Re: Objects that can stringify in multiple ways]]
([[Anne van Kesteren]]著, [TIME[2017-03-16 16:48:45 +09:00]])
<https://lists.w3.org/Archives/Public/public-script-coord/2017JanMar/0024.html>
[14] [CITE@en[Editorial: change headings around in the API section]]
([[annevk]]著, [TIME[2017-03-31 22:05:07 +09:00]])
<https://github.com/whatwg/url/commit/a562c55d659e1657d1dc9f9fad600bd9f9d70d82>
[15] [CITE@en[Specify window.webkitURL as an alias to URL]]
([[zcorpan]]著, [TIME[2017-05-31 19:17:26 +09:00]])
<https://github.com/whatwg/url/commit/c643963adaf99100d21d3bfb5969783b551b5150>