diff options
Diffstat (limited to 'files/uk/web/api/globaleventhandlers')
4 files changed, 0 insertions, 532 deletions
diff --git a/files/uk/web/api/globaleventhandlers/index.html b/files/uk/web/api/globaleventhandlers/index.html deleted file mode 100644 index 982d3d2ca3..0000000000 --- a/files/uk/web/api/globaleventhandlers/index.html +++ /dev/null @@ -1,273 +0,0 @@ ---- -title: GlobalEventHandlers -slug: Web/API/GlobalEventHandlers -tags: - - API - - GlobalEventHandlers - - HTML DOM - - Mixin - - NeedsTranslation - - Reference - - TopicStub - - events -translation_of: Web/API/GlobalEventHandlers ---- -<div>{{ApiRef("HTML DOM")}}</div> - -<p><span class="seoSummary">The <strong><code>GlobalEventHandlers</code></strong> mixin describes the event handlers common to several interfaces like {{domxref("HTMLElement")}}, {{domxref("Document")}}, or {{domxref("Window")}}.</span> Each of these interfaces can, of course, add more event handlers in addition to the ones listed below.</p> - -<div class="note"> -<p><strong>Note</strong>: <code>GlobalEventHandlers</code> is a mixin and not an interface; you can't actually create an object of type <code>GlobalEventHandlers</code>.</p> -</div> - -<h2 id="Properties_2">Properties</h2> - -<p><em>This interface doesn't include any properties except for the event handlers listed below.</em></p> - -<h3 id="Event_handlers">Event handlers</h3> - -<p>These event handlers are defined on the {{domxref("GlobalEventHandlers")}} mixin, and implemented by {{domxref("HTMLElement")}}, {{domxref("Document")}}, {{domxref("Window")}}, as well as by {{domxref("WorkerGlobalScope")}} for Web Workers.</p> - -<div id="Properties"> -<dl> - <dt>{{domxref("GlobalEventHandlers.onabort")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{domxref("HTMLMediaElement/abort_event", "abort")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onanimationcancel")}} {{Non-standard_inline}}</dt> - <dd>An {{domxref("EventHandler")}} called when an {{event("animationcancel")}} event is sent, indicating that a running <a href="/en-US/docs/Web/CSS/CSS_Animations">CSS animation</a> has been canceled.</dd> - <dt>{{domxref("GlobalEventHandlers.onanimationend")}} {{Non-standard_inline}}</dt> - <dd>An {{domxref("EventHandler")}} called when an {{event("animationend")}} event is sent, indicating that a <a href="/en-US/docs/Web/CSS/CSS_Animations">CSS animation</a> has stopped playing.</dd> - <dt>{{domxref("GlobalEventHandlers.onanimationiteration")}} {{Non-standard_inline}}</dt> - <dd>An {{domxref("EventHandler")}} called when an {{event("animationiteration")}} event has been sent, indicating that a <a href="/en-US/docs/Web/CSS/CSS_Animations">CSS animation</a> has begun playing a new iteration of the animation sequence.</dd> - <dt>{{domxref("GlobalEventHandlers.onanimationstart")}} {{Non-standard_inline}}</dt> - <dd>An {{domxref("EventHandler")}} called when an {{event("animationstart")}} event is sent, indicating that a <a href="/en-US/docs/Web/CSS/CSS_Animations">CSS animation</a> has started playing.</dd> - <dt>{{domxref("GlobalEventHandlers.onauxclick")}} {{Non-standard_inline}}</dt> - <dd>An {{domxref("EventHandler")}} called when an {{event("auxclick")}} event is sent, indicating that a non-primary button has been pressed on an input device (e.g. a middle mouse button).</dd> - <dt>{{domxref("GlobalEventHandlers.onblur")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("blur")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onerror")}}</dt> - <dd>Is an {{domxref("OnErrorEventHandler")}} representing the code to be called when the {{event("error")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onfocus")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("focus")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.oncancel")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("cancel")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.oncanplay")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("canplay")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.oncanplaythrough")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("canplaythrough")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onchange")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("change")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onclick")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("click")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onclose")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("close")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.oncontextmenu")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("contextmenu")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.oncuechange")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("cuechange")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ondblclick")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("dblclick")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ondrag")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("drag")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ondragend")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("dragend")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ondragenter")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("dragenter")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ondragexit")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("dragexit")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ondragleave")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("dragleave")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ondragover")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("dragover")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ondragstart")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("dragstart")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ondrop")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("drop")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ondurationchange")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("durationchange")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onemptied")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("emptied")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onended")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("ended")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onformdata")}}</dt> - <dd>Is an {{domxref("EventHandler")}} for processing {{event("formdata")}} events, fired after the entry list representing the form's data is constructed.</dd> - <dt>{{domxref("GlobalEventHandlers.ongotpointercapture")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("gotpointercapture")}} event type is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.oninput")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("input")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.oninvalid")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("invalid")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onkeydown")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("keydown")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onkeypress")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("keypress")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onkeyup")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("keyup")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onload")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("load")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onloadeddata")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("loadeddata")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onloadedmetadata")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("loadedmetadata")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onloadend")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("loadend")}} event is raised (when progress has stopped on the loading of a resource.)</dd> - <dt>{{domxref("GlobalEventHandlers.onloadstart")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("loadstart")}} event is raised (when progress has begun on the loading of a resource.)</dd> - <dt>{{domxref("GlobalEventHandlers.onlostpointercapture")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("lostpointercapture")}} event type is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onmousedown")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mousedown")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onmouseenter")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mouseenter")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onmouseleave")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mouseleave")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onmousemove")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mousemove")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onmouseout")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mouseout")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onmouseover")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mouseover")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onmouseup")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mouseup")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onmousewheel")}} {{Non-standard_inline}} {{Deprecated_inline}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("mousewheel")}} event is raised. Deprecated. Use <code>onwheel</code> instead.</dd> - <dt>{{ domxref("GlobalEventHandlers.onwheel") }}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("wheel")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onpause")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pause")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onplay")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("play")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onplaying")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("playing")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onpointerdown")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerdown")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onpointermove")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointermove")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onpointerup")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerup")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onpointercancel")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointercancel")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onpointerover")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerover")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onpointerout")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerout")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onpointerenter")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerenter")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onpointerleave")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerleave")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onpointerlockchange")}} {{experimental_inline}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerlockchange")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onpointerlockerror")}} {{experimental_inline}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("pointerlockerror")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onprogress")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("progress")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onratechange")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("ratechange")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onreset")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("reset")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onresize")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("resize")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onscroll")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("scroll")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onseeked")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("seeked")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onseeking")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("seeking")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onselect")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("select")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onselectstart")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("selectionchange")}} event is raised, i.e. when the user starts to make a new text selection on a web page.</dd> - <dt>{{domxref("GlobalEventHandlers.onselectionchange")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("selectionchange")}} event is raised, i.e. when the text selected on a web page changes.</dd> - <dt>{{domxref("GlobalEventHandlers.onshow")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("show")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onsort")}} {{experimental_inline}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("sort")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onstalled")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("stalled")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onsubmit")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("submit")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onsuspend")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("suspend")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ontimeupdate")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("timeupdate")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.onvolumechange")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("volumechange")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ontouchcancel")}} {{Non-standard_inline}} {{Experimental_inline}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("touchcancel")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ontouchend")}} {{Non-standard_inline}} {{Experimental_inline}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("touchend")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ontouchmove")}} {{Non-standard_inline}} {{Experimental_inline}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("touchmove")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ontouchstart")}} {{Non-standard_inline}} {{Experimental_inline}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("touchstart")}} event is raised.</dd> - <dt>{{domxref("GlobalEventHandlers.ontransitioncancel")}}</dt> - <dd>An {{domxref("EventHandler")}} called when a {{event("transitioncancel")}} event is sent, indicating that a <a href="/en-US/docs/Web/CSS/CSS_Transitions">CSS transition</a> has been cancelled.</dd> - <dt>{{domxref("GlobalEventHandlers.ontransitionend")}}</dt> - <dd>An {{domxref("EventHandler")}} called when a {{event("transitionend")}} event is sent, indicating that a <a href="/en-US/docs/Web/CSS/CSS_Transitions">CSS transition</a> has finished playing.</dd> - <dt>{{domxref("GlobalEventHandlers.ontransitionrun")}}</dt> - <dd>An {{domxref("EventHandler")}} called when a {{event("transitionrun")}} event is sent, indicating that a <a href="/en-US/docs/Web/CSS/CSS_Transitions">CSS transition</a> is running, though not nessarilty started.</dd> - <dt>{{domxref("GlobalEventHandlers.ontransitionstart")}}</dt> - <dd>An {{domxref("EventHandler")}} called when a {{event("transitionstart")}} event is sent, indicating that a <a href="/en-US/docs/Web/CSS/CSS_Transitions">CSS transition</a> has started transitioning.</dd> - <dt>{{domxref("GlobalEventHandlers.onwaiting")}}</dt> - <dd>Is an {{domxref("EventHandler")}} representing the code to be called when the {{event("waiting")}} event is raised.</dd> -</dl> -</div> - -<h2 id="Methods">Methods</h2> - -<p><em>This interface defines no methods.</em></p> - -<h2 id="Specifications">Specifications</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName("Selection API",'', 'Extension to GlobalEventHandlers')}}</td> - <td>{{Spec2('Selection API')}}</td> - <td>Adds <code>onselectionchange.</code></td> - </tr> - <tr> - <td>{{SpecName('Pointer Lock', '#extensions-to-the-document-interface', 'Extension of Document')}}</td> - <td>{{Spec2('Pointer Lock')}}</td> - <td>Adds <code>onpointerlockchange</code> and <code>onpointerlockerror</code> on {{domxref("Document")}}. It is experimentally implemented on <code>GlobalEventHandlers</code>.</td> - </tr> - <tr> - <td>{{SpecName('HTML WHATWG', '#globaleventhandlers', 'GlobalEventHandlers')}}</td> - <td>{{Spec2('HTML WHATWG')}}</td> - <td>No change since the latest snapshot, {{SpecName("HTML5.1")}}.</td> - </tr> - <tr> - <td>{{SpecName('HTML5.1', '#globaleventhandlers', 'GlobalEventHandlers')}}</td> - <td>{{Spec2('HTML5.1')}}</td> - <td>Snapshot of {{SpecName("HTML WHATWG")}}. Added <code>onsort</code> since the {{SpecName("HTML5 W3C")}} snapshot.</td> - </tr> - <tr> - <td>{{SpecName("HTML5 W3C", "#globaleventhandlers", "GlobalEventHandlers")}}</td> - <td>{{Spec2('HTML5 W3C')}}</td> - <td>Snapshot of {{SpecName("HTML WHATWG")}}. Creation of <code>GlobalEventHandlers</code> (properties where on the target before it).</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">Browser compatibility</h2> - -<div> - - -<p>{{Compat("api.GlobalEventHandlers")}}</p> -</div> - -<h2 id="See_also">See also</h2> - -<ul> - <li>{{domxref("Element")}}</li> - <li>{{domxref("EventHandler")}}</li> - <li>{{domxref("Event")}}</li> -</ul> diff --git a/files/uk/web/api/globaleventhandlers/onkeydown/index.html b/files/uk/web/api/globaleventhandlers/onkeydown/index.html deleted file mode 100644 index 535fd8b0a0..0000000000 --- a/files/uk/web/api/globaleventhandlers/onkeydown/index.html +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: GlobalEventHandlers.onkeydown -slug: Web/API/GlobalEventHandlers/onkeydown -tags: - - HTML DOM - - Обробник подій - - клавіатура - - події клавіатури -translation_of: Web/API/GlobalEventHandlers/onkeydown ---- -<div>{{ApiRef("HTML DOM")}}</div> - -<p>Властивість <code><strong>onkeydown</strong></code> спільно з <a href="https://wiki.developer.mozilla.org/uk/docs/Web/API/GlobalEventHandlers"><code>GlobalEventHandlers</code></a> є <a href="https://wiki.developer.mozilla.org/uk/docs/Web/API/EventHandler" rel="nofollow"><code>EventHandler</code></a> обробляє події {{event("keydown")}}.</p> - -<p>Подія <code>keydown</code> спрацьовує, коли користувач натискає клавішу клавіатури.</p> - -<h2 id="Синтаксис">Синтаксис</h2> - -<pre class="syntaxbox"><em>target</em>.onkeydown = <em>functionRef</em>;</pre> - -<h3 id="Значення">Значення</h3> - -<p><code>functionRef</code> це ім'я функції або вираз функції. В якості єдиного аргументу функція отримує об'єкт {{domxref("KeyboardEvent")}}.</p> - -<h2 id="Приклад">Приклад</h2> - -<p>У цьому прикладі виводитимуться значення {{domxref("KeyboardEvent.code")}} щоразу, коли ви натискаете клавішу всередині елемента {{HtmlElement("input")}}.</p> - -<h3 id="HTML">HTML</h3> - -<pre class="brush: html"><input> -<p id="log"></p></pre> - -<h3 id="JavaScript">JavaScript</h3> - -<pre class="brush: js">const input = document.querySelector('input'); -const log = document.getElementById('log'); - -input.onkeydown = logKey; - -function logKey(e) { - log.textContent += ` ${e.code}`; -}</pre> - -<h3 id="Підсумок">Підсумок</h3> - -<p>{{EmbedLiveSample("Example")}}</p> - -<h2 id="Специфікації">Специфікації</h2> - -<table class="spectable standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName('HTML WHATWG','webappapis.html#handler-onkeydown','onkeydown')}}</td> - <td>{{Spec2('HTML WHATWG')}}</td> - <td></td> - </tr> - </tbody> -</table> - -<h2 id="Сумісність_з_браузерами">Сумісність з браузерами </h2> - - - -<p>{{Compat("api.GlobalEventHandlers.onkeydown")}}</p> - -<h3 id="Нотатки_щодо_сумісності">Нотатки щодо сумісності</h3> - -<p>Так якб Firefox 65 події клавіатури і ключа тепер запускаються під час складання IME, для поліпшення крос-браузерної сумісності для користувачів CJKT (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=354358" rel="noopener">bug 354358</a>, також більш детальну інформацію дивіться <a href="https://www.fxsitecompat.com/en-CA/docs/2018/keydown-and-keyup-events-are-now-fired-during-ime-composition/" rel="noopener">keydown and keyup події наразі запускаються під час складання IME</a>. Щоб проігнорувати всі події <code>keyup</code> , зробіть щось на зразок цього (229 це спеціальний набір значень для <code>keyCode</code> що відноситься до читу, який був використаний IME):</p> - -<pre class="brush: js"><code>eventTarget.addEventListener("keydown", event => { - if (event.isComposing || event.keyCode === 229) { - return; - } - // зробити що-небудь });</code> -</pre> - -<h2 id="See_also">See also</h2> - -<ul> - <li>Подія {{Event("keydown")}} </li> - <li>Пов'язані обробники подій - <ul> - <li>{{domxref("GlobalEventHandlers.onkeypress")}}</li> - <li>{{domxref("GlobalEventHandlers.onkeyup")}}</li> - </ul> - </li> -</ul> diff --git a/files/uk/web/api/globaleventhandlers/onkeyup/index.html b/files/uk/web/api/globaleventhandlers/onkeyup/index.html deleted file mode 100644 index d429593327..0000000000 --- a/files/uk/web/api/globaleventhandlers/onkeyup/index.html +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: GlobalEventHandlers.onkeyup -slug: Web/API/GlobalEventHandlers/onkeyup -tags: - - HTML DOM - - Обробник подій - - клавіатура - - події клавіатури -translation_of: Web/API/GlobalEventHandlers/onkeyup ---- -<div>{{ApiRef("HTML DOM")}}</div> - -<div></div> - -<p>Властивість <code><strong>onkeyup</strong></code> спільно з {{domxref("GlobalEventHandlers")}} є {{domxref("EventHandler")}} обробляє події {{event("keyup")}} .</p> - -<p>Подія <code>keyup</code> спрацьовує, коли користувач відпускає раніше натиснуту клавішу клавіатури.</p> - -<h2 id="Синтаксис">Синтаксис</h2> - -<pre class="syntaxbox"><em>target</em>.onkeyup = <em>functionRef</em>;</pre> - -<h3 id="Значення">Значення</h3> - -<p><code>functionRef </code>це ім'я функції або вираз функції. В якості єдиного аргументу функція отримує об'єкт {{domxref("KeyboardEvent")}}.</p> - -<h2 id="Приклад">Приклад</h2> - -<p>У цьому прикладі виводитимуться значення {{domxref ("KeyboardEvent.code")}} щоразу, коли ви відпускаєте клавішу всередині елемента {{HtmlElement ("input")}}.</p> - -<h3 id="HTML">HTML</h3> - -<pre class="brush: html"><input> -<p id="log"></p></pre> - -<h3 id="JavaScript">JavaScript</h3> - -<pre class="brush: js">const input = document.querySelector('input'); -const log = document.getElementById('log'); - -input.onkeyup = logKey; // - -function logKey(e) { - log.textContent += ` ${e.code}`; //Видає у тегу <p> ключ натиснутої клавіші -}</pre> - -<h3 id="Підсумок">Підсумок</h3> - -<p>{{EmbedLiveSample("Example")}}</p> - -<h2 id="Специфікації">Специфікації</h2> - -<table class="spectable standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName('HTML WHATWG','webappapis.html#handler-onkeyup','onkeyup')}}</td> - <td>{{Spec2('HTML WHATWG')}}</td> - <td></td> - </tr> - </tbody> -</table> - -<h2 id="Сумісність_з_браузерами">Сумісність з браузерами</h2> - - - -<p>{{Compat("api.GlobalEventHandlers.onkeyup")}}</p> - -<h3 id="Нотатки_щодо_сумісності">Нотатки щодо сумісності</h3> - -<p>Так як Firefox 65, події клавіатури і ключа тепер запускаються під час складання IME, для поліпшення крос-браузерної сумісності для користувачів CJKT ({{bug (354358)}}, також більш детальну інформацію дивіться <a href="https://www.fxsitecompat.com/en-CA/docs/2018/keydown-and-keyup-events-are-now-fired-during-ime-composition/">keydown and keyup події наразі запускаються під час складання IME</a>. Щоб проігнорувати всі події <code>keyup</code> , зробіть щось на зразок цього (229 це спеціальний набір значень для <code>keyCode</code> що відноситься до читу, який був використаний IME):</p> - -<pre class="brush: js"><code>eventTarget.addEventListener("keyup", event => { - if (event.isComposing || event.keyCode === 229) { - return; - } - // зробити що-небудь -});</code></pre> - -<h2 id="Див._також">Див. також</h2> - -<ul> - <li>Подія {{Event("keyup")}} </li> - <li>Пов'язані обробники подій - <ul> - <li>{{domxref("GlobalEventHandlers.onkeydown")}}</li> - <li>{{domxref("GlobalEventHandlers.onkeypress")}}</li> - </ul> - </li> -</ul> diff --git a/files/uk/web/api/globaleventhandlers/onmouseover/index.html b/files/uk/web/api/globaleventhandlers/onmouseover/index.html deleted file mode 100644 index b3d98e075e..0000000000 --- a/files/uk/web/api/globaleventhandlers/onmouseover/index.html +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: Обробник_глобальних_подій.onmouseover -slug: Web/API/GlobalEventHandlers/onmouseover -tags: - - Event Handler - - onmouseover - - Обробник глобальних подій - - Подія мищі -translation_of: Web/API/GlobalEventHandlers/onmouseover ---- -<div>{{ApiRef("HTML DOM")}}</div> - -<p>Властивістю <code><strong>onmouseover</strong></code> мікшіна {{domxref("GlobalEventHandlers")}} є {{domxref("EventHandler")}} , який обробляє події наведення миші {{event("mouseover")}}.</p> - -<p>Подія <code>mouseover</code> запускається, коли користувач переміщує курсор на певний елемент. </p> - -<h2 id="Синтаксис">Синтаксис</h2> - -<pre class="syntaxbox"><em>element</em>.onmouseover = <em>function</em>; -</pre> - -<h2 class="editable" id="Приклад"><span>Приклад</span></h2> - -<p><span><span>Цей приклад додає <code>onmouseover</code> та <code>onmouseout</code> подіі до параграфу. Спробуйте перемістити мишу до елементу.</span></span></p> - -<h3 id="HTML">HTML</h3> - -<pre class="brush: html"><p>Test your mouse on me!</p></pre> - -<h3 id="JavaScript">JavaScript</h3> - -<pre class="brush: js">const p = document.querySelector('p'); -p.onmouseover = logMouseOver; -p.onmouseout = logMouseOut; - -function logMouseOver() { - p.innerHTML = 'Виявлено MOUSE OVER'; -} - -function logMouseOut() { - p.innerHTML = 'Виявлено MOUSE OUT'; -}</pre> - -<h3 id="Результат">Результат</h3> - -<p>{{EmbedLiveSample("Example")}}</p> - -<h2 id="Специфікації">Специфікації</h2> - -<table class="spectable standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName('HTML WHATWG','webappapis.html#handler-onmouseover','onmouseover')}}</td> - <td>{{Spec2('HTML WHATWG')}}</td> - <td></td> - </tr> - </tbody> -</table> - -<h2 id="Сумісність_з_браузерами">Сумісність з браузерами</h2> - -<div> - - -<p>{{Compat("api.GlobalEventHandlers.onmouseover")}}</p> -</div> |