-
Notifications
You must be signed in to change notification settings - Fork 4
/
745.txt
99 lines (77 loc) · 3.21 KB
/
745.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
[23] [DFN[[CODE(DOMe)@en[[[readystatechange]]]] [[事象]]]]は、 [CODE(DOMa)@en[[[readyState]]]]
[[属性]]が変化した時に[[発火]]される[[事象]]です。 [DFN[[CODE(DOMa)@en[[[onreadystatechange]]]]]]
は、 [CODE(DOMe)@en[[[readystatechange]]]] [[事象]]のための[RUBYB[[[事象取扱器]]]@en[event handler]]
([[事象取扱器内容属性]]、[[事象取扱器IDL属性]]) です。
* 仕様書
[REFS[
- [24] [[Web Applications 1.0]] ([[HTML5]])
-- [25] '''<http://www.whatwg.org/specs/web-apps/current-work/complete.html#handler-onreadystatechange>'''
--- [[事象取扱器]]
-- [26] <http://www.whatwg.org/specs/web-apps/current-work/complete.html#current-document-readiness>
--- [[現在文書準備度]]
- [32] [[XHR]]
-- [33] '''<http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#event-xhr-readystatechange>'''
--- [[事象]]
-- [36] <http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#dispatch-readystatechange-event>
--- [[[CODE(DOMe)@en[readystatechange]]事象発火]]
]REFS]
* イベントハンドラー
[27] [CODE(HTMLa)@en[[[onreadystatechange]]]] [[内容属性]]はすべての [[HTML要素]]で利用可能です。
[28] [CODE(DOMa)@en[[[onreadystatechange]]]] [[IDL属性]]は次の[[オブジェクト]]で利用可能です。
[FIG(short list)[
- [29] [CODE(DOMi)@en[[[HTMLElement]]]]
- [30] [CODE(DOMi)@en[[[Document]]]]
- [31] [CODE(DOMi)@en[[[Window]]]]
]FIG]
* イベントの適用対象
[1] [[Webブラウザー]]によって[[発火]]される [CODE(DOMe)@en[[[readystatechange]]]]
[[イベント]]は、 [CODE(DOMa)@en[[[readyState]]]] [[IDL属性]]がある[[オブジェクト]]で、
その値の変化を示すために使われます。
[FIG(table)[
:x:[[オブジェクト]]
:readyState:[CODE(DOMa)@en[[[readyState]]]]
:constprop:[[定数]][[プロパティー]]
:onidl:[CODE(DOMa)@en[[[onreadystatechange]]]] [[IDL属性]]
:oncontent:[CODE(HTMLa)@en[[[onreadystatechange]]]] [[内容属性]]
:event:[CODE(DOMe)@en[[[readystatechange]]]] [[イベント]]
:x:[CODE(DOMi)@en[[[HTMLElement]]]]
:onidl:○
:oncontent:○
:x:[CODE(DOMi)@en[[[HTMLMediaElement]]]]
:onidl:○
:oncontent:○
:readyState:数値定数
:constprop:○
:event:○
:x:[CODE(DOMi)@en[[[HTMLTrackElement]]]]
:onidl:○
:oncontent:○
:constprop:○
:readyState:数値定数
:x:[CODE(DOMi)@en[[[Document]]]]
:readyState:文字列定数
:onidl:○
:event:○
:x:[CODE(DOMi)@en[[[Window]]]]
:onidl:○
:x:[CODE(DOMi)@en[[[XMLHttpRequest]]]]
:onidl:○
:readyState:数値定数
:event:○
:constprop:○
:x:[CODE(DOMi)@en[[[EventSource]]]]
:readyState:数値定数
:constprop:○
:x:[CODE(DOMi)@en[[[WebSocket]]]]
:readyState:数値定数
:constprop:○
:x:[CODE(DOMi)@en[[[MediaController]]]]
:readyState:数値定数
]FIG]
* 歴史
[42] [CITE@en[Web Applications 1.0 r6550 Revert r6543 and instead move onreadystatechange to be only on Document.]]
( ([TIME[2011-09-10 07:44:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=6549&to=6550>
[2] [CITE@en[Fire readystatechange more often than readyState changes]]
([[annevk]]著, [TIME[2016-09-28 17:49:59 +09:00]])
<https://github.com/whatwg/xhr/commit/8efe6aad48b2824dbd7cb79836946f94d674ad4d>