/
902.txt
77 lines (54 loc) · 2.75 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
[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[[[createFor]]]]
- [CODE(DOMm)@en[[[revokeObjectURL]]]]
- [CODE(JS)@en[[[prototype]]]]
]FIG]
[7] [[File API]] の規定する [[Blob URL]] に関する[[静的メソッド]]を実装し、
[[URL Standard]] の規定する [[URL API]] は実装しない場合は、
[CODE(DOMi)@en[[[URL]]]] [[インターフェイスオブジェクト]]の
[CODE(JS)@en[[[prototype]]]] [[特性]]を晒しては[['''なりません''']] [SRC[>>5]]。
;; [8] [[API]] が規定された歴史的順序より、このような制約があります。
現在となっては [[URL API]] を実装しない理由はありません。
* テストケース
[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>