--- title: Event.createEvent() slug: Web/API/Document/createEvent translation_of: Web/API/Document/createEvent translation_of_original: Web/API/Event/createEvent original_slug: Web/API/Event/createEvent --- <p>{{APIRef("DOM")}}</p> <p>새로운 event를 생성합니다, 새로 만들어진 event는 반드시 자신의 init() method를 호출함으로써 초기화되어야만 합니다.</p> <h3 id="Syntax">Syntax</h3> <pre><code>document.createEvent(type) </code></pre> <dl> <dt><code>type</code></dt> <dd>A string indicating the event type to create.</dd> </dl> <p>이 method는 명시된 타입인 새로운 DOM {{ domxref("Event") }} 객체를 반환하며 이는 반드시 사용 전에 초기화되어야만 합니다.</p> <h3 id="Example">Example</h3> <pre>var newEvent = document.createEvent("UIEvents");</pre> <h3 id="Specification">Specification</h3> <ul> <li><a class="external" href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-document">DOM Level 2 Events</a></li> </ul>