createEvent

createEvent

[1] Document オブジェクトcreateEvent メソッドは、 Event オブジェクトを新たに作成します。

代替

[13] Event コンストラクターを使うべきです。

仕様書

引数

[2] createEvent メソッドの第1引数には、作成するオブジェクトが実装する界面の名前を指定しなければなりません。 「Event」と指定すると最も基本的な Event オブジェクトが作られます。

関連

[3] IE事象モデルで同様の機能を持つのは createEventObject メソッドです。

歴史

[4] WICD Mobile 1.0 ( ( 版)) <http://www.w3.org/TR/WICDMobile/#dom-events-ext>

[5] Define dictionary defaults for events. Clean up createEvent(). Note issu... · 508b3d5 · whatwg/dom ( ( 版)) <https://github.com/whatwg/dom/commit/508b3d58eb9df5250cc42cefa71062945c154ef0>

[7] 868751 – Remove support for document.createEvent("AnimationEvent"), document.createEvent("TransitionEvent"), AnimationEvent.initAnimationEvent, and TransitionEvent.initTransitionEvent ( ( 版)) <https://bugzilla.mozilla.org/show_bug.cgi?id=868751>

[8] Bug 25491 – createEvent and case significance ( ( 版)) <https://www.w3.org/Bugs/Public/show_bug.cgi?id=25491>

[9] Add more createEvent() names per https://www.w3.org/Bugs/Public/show_bug... · 333b03c · whatwg/dom ( ( 版)) <https://github.com/whatwg/dom/commit/333b03cf6454e803d6433673c33f1292821dac0a>

[10] Bug 25907 – Need initMessageEvent method because https://github.com/whatwg/dom/commit/333b03cf6454e803d6433673c33f1292821dac0a ( ( 版)) <https://www.w3.org/Bugs/Public/show_bug.cgi?id=25907>

[11] Resolve issue 51 don't recommend createEvent · w3c/uievents@e5ba8ae ( 版) <https://github.com/w3c/uievents/commit/e5ba8aebeb6d1e2aa38cd6c637f59dce1c355981>

[12] Fix #148: drop "keyevents" as an alias of "keyboardevent" for createE… · whatwg/dom@09d7eb6 ( 版) <https://github.com/whatwg/dom/commit/09d7eb6f7da7057d605acb4f93627e7ee2cbe0a7>

[14] Add more legacy event types for createEvent() · whatwg/dom@9e3ce67 ( 版) <https://github.com/whatwg/dom/commit/9e3ce67c7927d6642646a3d0c84fa6d8f7926cfa>

[15] Issue 569690 - chromium - createEvent() should only work for whitelisted event interfaces - Monorail ( 版) <https://bugs.chromium.org/p/chromium/issues/detail?id=569690>

[16] SVGEvent is only Gecko, Blink also has SVGEvents · whatwg/dom@a9d2a37 ( 版) <https://github.com/whatwg/dom/commit/a9d2a37f85baffa82e0cf16ec2a552c6ab4e527d>

[17] Make document.createEvent("touchevent") sometimes throw · whatwg/dom@cb7c16b ( 版) <https://github.com/whatwg/dom/commit/cb7c16b764d64e43da1f9d62da7d4066341ff0e5>

[18] No longer support ProgressEvent in createEvent() (annevk著, ) <https://github.com/whatwg/dom/commit/9cd47d08c86820ac03c6c2e309e8d874e113089c>

[19] Make Event's timeStamp use DOMHighResTimeStamp (majido著, ) <https://github.com/whatwg/dom/commit/912d58746bc4c67c2fd210124639f7c34991fce5>

[20] Remove more types from document.createEvent() (ayg著, ) <https://github.com/whatwg/dom/commit/5a532da58455e55b1e611161b72224d083fee7d4>

[21] document.createEvent() supports lots of events that most UAs do not support initializers for · Issue #362 · whatwg/dom () <https://github.com/whatwg/dom/issues/362>

[22] Remove more types from document.createEvent() by ayg · Pull Request #489 · whatwg/dom () <https://github.com/whatwg/dom/pull/489>