/
850.txt
67 lines (48 loc) · 3.1 KB
/
850.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
[1] [CODE(DOMi)@en[[[Document]]]] [[オブジェクト]]の [DFN[[CODE(DOMm)@en[[[createEvent]]]] [[メソッド]]]]は、
[CODE(DOMi)@en[[[Event]]]] [[オブジェクト]]を新たに作成します。
* 代替
[13] [CODE(DOMi)@en[[[Event]]]] [[コンストラクター]]を使うべきです。
* 仕様書
[REFS[
- [6] [CITE@en-US[DOM Standard]]
( ([TIME[2013-04-26 20:00:45 +09:00]] 版))
<https://dom.spec.whatwg.org/#dom-document-createevent>
]REFS]
* 引数
[2] [CODE(DOMi)@en[[[createEvent]]]] [[メソッド]]の第1引数には、作成する[[オブジェクト]]が実装する[[界面]]の名前を指定しなければなりません。
「[CODE(DOMi)@en[[[Event]]]]」と指定すると最も基本的な [CODE(DOMi)@en[[[Event]]]]
[[オブジェクト]]が作られます。
* 関連
[3] [[IE事象モデル]]で同様の機能を持つのは [CODE(DOMm)@en[[[createEventObject]]]]
[[メソッド]]です。
* 歴史
[4] [CITE@en[WICD Mobile 1.0]]
( ([TIME[2010-08-17 16:50:39 +09:00]] 版))
<http://www.w3.org/TR/WICDMobile/#dom-events-ext>
[5] [CITE[Define dictionary defaults for events. Clean up createEvent(). Note issu... · 508b3d5 · whatwg/dom]]
( ([TIME[2013-04-04 09:14:17 +09:00]] 版))
<https://github.com/whatwg/dom/commit/508b3d58eb9df5250cc42cefa71062945c154ef0>
[7] [CITE@en[868751 – Remove support for document.createEvent("AnimationEvent"), document.createEvent("TransitionEvent"), AnimationEvent.initAnimationEvent, and TransitionEvent.initTransitionEvent]]
( ([TIME[2013-11-13 21:13:14 +09:00]] 版))
<https://bugzilla.mozilla.org/show_bug.cgi?id=868751>
[8] [CITE@en[Bug 25491 – createEvent and case significance]]
( ([TIME[2014-05-05 08:14:52 +09:00]] 版))
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=25491>
[9] [CITE[Add more createEvent() names per https://www.w3.org/Bugs/Public/show_bug... · 333b03c · whatwg/dom]]
( ([TIME[2014-05-22 01:43:36 +09:00]] 版))
<https://github.com/whatwg/dom/commit/333b03cf6454e803d6433673c33f1292821dac0a>
[10] [CITE@en[Bug 25907 – Need initMessageEvent method because https://github.com/whatwg/dom/commit/333b03cf6454e803d6433673c33f1292821dac0a]]
( ([TIME[2014-05-29 10:28:35 +09:00]] 版))
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=25907>
[11] [CITE@en[Resolve issue 51 don't recommend createEvent · w3c/uievents@e5ba8ae]]
([TIME[2016-01-21 11:53:43 +09:00]] 版)
<https://github.com/w3c/uievents/commit/e5ba8aebeb6d1e2aa38cd6c637f59dce1c355981>
[12] [CITE@en[Fix #148: drop "keyevents" as an alias of "keyboardevent" for createE… · whatwg/dom@09d7eb6]]
([TIME[2016-02-29 17:04:32 +09:00]] 版)
<https://github.com/whatwg/dom/commit/09d7eb6f7da7057d605acb4f93627e7ee2cbe0a7>
[14] [CITE@en[Add more legacy event types for createEvent() · whatwg/dom@9e3ce67]]
([TIME[2016-04-16 14:37:45 +09:00]] 版)
<https://github.com/whatwg/dom/commit/9e3ce67c7927d6642646a3d0c84fa6d8f7926cfa>
[15] [CITE@en[Issue 569690 - chromium - createEvent() should only work for whitelisted event interfaces - Monorail]]
([TIME[2016-04-16 14:54:34 +09:00]] 版)
<https://bugs.chromium.org/p/chromium/issues/detail?id=569690>