diff options
author | MDN <actions@users.noreply.github.com> | 2021-04-17 00:11:36 +0000 |
---|---|---|
committer | MDN <actions@users.noreply.github.com> | 2021-04-17 00:11:36 +0000 |
commit | 0ccebc7eb352eda4d26d0b876fea36f24f482eec (patch) | |
tree | f5c0a32bc5149d8bd5aa7942577758ce7c8ed485 /files/pl/web/guide | |
parent | 40cd01daeb2f6f7fff40ff2986208513afc8678e (diff) | |
download | translated-content-0ccebc7eb352eda4d26d0b876fea36f24f482eec.tar.gz translated-content-0ccebc7eb352eda4d26d0b876fea36f24f482eec.tar.bz2 translated-content-0ccebc7eb352eda4d26d0b876fea36f24f482eec.zip |
[CRON] sync translated content
Diffstat (limited to 'files/pl/web/guide')
-rw-r--r-- | files/pl/web/guide/events/creating_and_triggering_events/index.html | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/files/pl/web/guide/events/creating_and_triggering_events/index.html b/files/pl/web/guide/events/creating_and_triggering_events/index.html deleted file mode 100644 index bc359ede78..0000000000 --- a/files/pl/web/guide/events/creating_and_triggering_events/index.html +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: dispatchEvent - przykład -slug: Web/Guide/Events/Creating_and_triggering_events -tags: - - DOM - - Dokumentacja_Gecko_DOM - - Gecko - - Wszystkie_kategorie -translation_of: Web/Guide/Events/Creating_and_triggering_events -translation_of_original: Web/Guide/Events/Event_dispatching_example -original_slug: DOM/dispatchEvent_-_przykład ---- -<div class="noinclude"> - {{ ApiRef() }}</div> -<p>Poniższy przykład przedstawia symulację kliknięcia w pole wyboru opartą o metody DOM. Możesz zobaczyć <a class="external" href="http://developer.mozilla.org/samples/domref/dispatchEvent.html">przykład w działaniu</a>.</p> -<pre class="eval">function simulateClick() { - var evt = <a href="pl/DOM/document.createEvent">document.createEvent</a>("MouseEvents"); - evt.<a href="pl/DOM/event.initMouseEvent">initMouseEvent</a>("click", true, true, window, - 0, 0, 0, 0, 0, false, false, false, false, 0, null); - var cb = document.getElementById("checkbox"); - var canceled = !cb.<a href="pl/DOM/element.dispatchEvent">dispatchEvent</a>(evt); - if(canceled) { - // metoda obsługi zdarzenia wywołała preventDefault - alert("canceled"); - } else { - // nie wywołano preventDefault - alert("not canceled"); - } -} -</pre> -<p> </p> -<p> </p> -<div class="noinclude"> - </div> -<p>{{ languages( { "en": "en/DOM/dispatchEvent_example", "es": "es/DOM/dispatchEvent_example", "fr": "fr/DOM/dispatchEvent_exemple" } ) }}</p> |