aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/api/document/createevent
diff options
context:
space:
mode:
authorFlorian Merz <me@fiji-flo.de>2021-02-11 14:46:50 +0100
committerFlorian Merz <me@fiji-flo.de>2021-02-11 14:46:50 +0100
commita55b575e8089ee6cab7c5c262a7e6db55d0e34d6 (patch)
tree5032e6779a402a863654c9d65965073f09ea4182 /files/es/web/api/document/createevent
parent8260a606c143e6b55a467edf017a56bdcd6cba7e (diff)
downloadtranslated-content-a55b575e8089ee6cab7c5c262a7e6db55d0e34d6.tar.gz
translated-content-a55b575e8089ee6cab7c5c262a7e6db55d0e34d6.tar.bz2
translated-content-a55b575e8089ee6cab7c5c262a7e6db55d0e34d6.zip
unslug es: move
Diffstat (limited to 'files/es/web/api/document/createevent')
-rw-r--r--files/es/web/api/document/createevent/index.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/files/es/web/api/document/createevent/index.html b/files/es/web/api/document/createevent/index.html
new file mode 100644
index 0000000000..7b273c6e33
--- /dev/null
+++ b/files/es/web/api/document/createevent/index.html
@@ -0,0 +1,35 @@
+---
+title: Event.createEvent()
+slug: Web/API/Event/createEvent
+tags:
+ - API
+ - DOM
+ - Evento
+ - metodo
+translation_of: Web/API/Document/createEvent
+translation_of_original: Web/API/Event/createEvent
+---
+<p>{{APIRef("DOM")}}</p>
+
+<p>Crea un nuevo evento, que debe ser inicializado llamando a su método <code>init()</code>.</p>
+
+<h3 id="Sintaxis">Sintaxis</h3>
+
+<pre><code>document.createEvent(tipo);</code></pre>
+
+<dl>
+ <dt><code>tipo</code></dt>
+ <dd>Una string indicando el tipo de evento a crear.</dd>
+</dl>
+
+<p>Este método devuelve un nuevo objeto {{ domxref("Event") }} del DOM del tipo indicado, que debe ser inicializado antes de su uso.</p>
+
+<h3 id="Ejemplo">Ejemplo</h3>
+
+<pre>var nuevoEvento = document.createEvent("UIEvents");</pre>
+
+<h3 id="Especificación">Especificación</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>