aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/event/createevent/index.html
blob: ef05a699e42f89f929b5f99e912dcb47f6bec806 (plain)
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
---
title: Event.createEvent()
slug: Web/API/Event/createEvent
translation_of: Web/API/Document/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" title="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-document">DOM Level 2 Events</a></li>
</ul>