diff options
author | Masahiro FUJIMOTO <mfujimot@gmail.com> | 2021-07-13 02:38:02 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-13 02:38:02 +0900 |
commit | 78fde80b73594eab872a2f4d14b445c4a4c68cff (patch) | |
tree | ce3f0b78a1e90fdb114d590368f12275e1c2e8c1 /files/ja/conflicting/web | |
parent | 2f058cf0373dae40da1fbf8060141b46df205e22 (diff) | |
download | translated-content-78fde80b73594eab872a2f4d14b445c4a4c68cff.tar.gz translated-content-78fde80b73594eab872a2f4d14b445c4a4c68cff.tar.bz2 translated-content-78fde80b73594eab872a2f4d14b445c4a4c68cff.zip |
Web/Guide/Events/Creating_and_triggering_events を更新 (#1372)
* Web/Guide/Events/Creating_and_triggering_events を更新
- conflicting 版は古いので削除
- 2021/04/23 時点の英語版に同期
* 追加修正
* 追加修正
* リダイレクトを修正
Diffstat (limited to 'files/ja/conflicting/web')
-rw-r--r-- | files/ja/conflicting/web/guide/events/creating_and_triggering_events/index.html | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/files/ja/conflicting/web/guide/events/creating_and_triggering_events/index.html b/files/ja/conflicting/web/guide/events/creating_and_triggering_events/index.html deleted file mode 100644 index cabf4007c9..0000000000 --- a/files/ja/conflicting/web/guide/events/creating_and_triggering_events/index.html +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: dispatchEvent example -slug: conflicting/Web/Guide/Events/Creating_and_triggering_events -tags: - - DOM - - Gecko - - Gecko DOM Reference -translation_of: Web/Guide/Events/Creating_and_triggering_events -translation_of_original: Web/Guide/Events/Event_dispatching_example -original_slug: DOM/dispatchEvent_example ---- -<div class="noinclude"> - {{ApiRef}}</div> -<p>次の例では DOM メソッドを使用してチェックボックスのクリックをシミュレート(※スクリプトでクリックイベントを生成)しています。</p> -<pre>function simulateClick() { - var evt = <a href="/ja/docs/DOM/document.createEvent" title="DOM/document.createEvent">document.createEvent</a>("MouseEvents"); - evt.<a href="/ja/docs/DOM/event.initMouseEvent" title="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="/ja/docs/DOM/element.dispatchEvent" title="DOM/element.dispatchEvent">dispatchEvent</a>(evt); - if(canceled) { - // A handler called preventDefault - alert("canceled"); - } else { - // None of the handlers called preventDefault - alert("not canceled"); - } -}</pre> -<p><a class="button liveSample external" href="http://developer.mozilla.org/samples/domref/dispatchEvent.html">実際の表示を確認</a></p> |