blob: 549a51bfdc9fe6ded8b19c48209728f9947fe457 (
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
30
|
---
title: Event.createEvent()
slug: Web/API/Event/createEvent
translation_of: Web/API/Document/createEvent
translation_of_original: 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" title="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-document">DOM Level 2 Events</a></li>
</ul>
|