Skip to content

Commit

Permalink
fix: flaws in web/api/e* batch 2 (#3043)
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni committed Mar 15, 2021
1 parent 996cad7 commit 8f24127
Show file tree
Hide file tree
Showing 18 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion files/en-us/web/api/encoding_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h2 id="Tutorials_tools">Tutorials &amp; tools</h2>

<ul>
<li>A <a href="http://code.google.com/p/stringencoding/">shim</a> allowing to use this interface in browsers that don't support it.</li>
<li><a href="/en-US/Add-ons/Code_snippets/StringView"><code>StringView</code></a> – a C-like representation of strings based on typed arrays.</li>
<li><a href="/en-US/docs/Mozilla/Add-ons/Code_snippets/StringView"><code>StringView</code></a> – a C-like representation of strings based on typed arrays.</li>
</ul>

<h2 id="Specifications">Specifications</h2>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/errorevent/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li><a href="/en-US/docs/Web/Guide/Performance/Using_web_workers">Using web workers</a>, most likely objects to raise such an event</li>
<li><a href="/en-US/docs/Web/API/Web_Workers_API/Using_web_workers">Using web workers</a>, most likely objects to raise such an event</li>
</ul>
2 changes: 1 addition & 1 deletion files/en-us/web/api/event/bubbles/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<p>The <code><strong>bubbles</strong></code> read-only property of the {{domxref("Event")}} interface indicates whether the event bubbles up through the DOM or not.</p>

<div class="note">
<p><strong>Note</strong>: See <a href="/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture">Event bubbling and capture</a> for more information on bubbling.</p>
<p><strong>Note</strong>: See <a href="/en-US/docs/Learn/JavaScript/Building_blocks/Events#event_bubbling_and_capture">Event bubbling and capture</a> for more information on bubbling.</p>
</div>

<h2 id="Syntax">Syntax</h2>
Expand Down
14 changes: 7 additions & 7 deletions files/en-us/web/api/event/comparison_of_event_targets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h3 id="Event_targets">Event targets</h3>
<th>Purpose</th>
</tr>
<tr>
<td><code><a href="/en-US/docs/DOM/event.target">event.target</a></code></td>
<td><code><a href="/en-US/docs/Web/API/Event/target">event.target</a></code></td>
<td><a href="https://www.w3.org/TR/DOM-Level-2/events.html#Events-interface">DOM Event Interface</a></td>
<td>
<p>The DOM element on the lefthand side of the call that triggered this event, eg:</p>
Expand All @@ -36,23 +36,23 @@ <h3 id="Event_targets">Event targets</h3>
</td>
</tr>
<tr>
<td><code><a href="/en-US/docs/DOM/event.currentTarget">event.currentTarget</a></code></td>
<td><code><a href="/en-US/docs/Web/API/Event/currentTarget">event.currentTarget</a></code></td>
<td><a href="https://www.w3.org/TR/DOM-Level-2/events.html#Events-interface">DOM Event Interface</a></td>
<td>The <a href="https://www.w3.org/TR/DOM-Level-2/events.html#Events-EventTarget"><code>EventTarget</code></a> whose <a href="https://www.w3.org/TR/DOM-Level-2/events.html#Events-EventListener"><code>EventListeners</code></a> are currently being processed. As the event capturing and bubbling occurs, this value changes.</td>
</tr>
<tr>
<td><code><a href="/en-US/docs/DOM/event.relatedTarget">event.relatedTarget</a></code></td>
<td><code><a href="/en-US/docs/Web/API/MouseEvent/relatedTarget">event.relatedTarget</a></code></td>
<td><a href="https://www.w3.org/TR/DOM-Level-2/events.html#Events-MouseEvent">DOM MouseEvent Interface</a></td>
<td>Identifies a secondary target for the event.</td>
</tr>
<tr>
<td><code><a href="/en-US/docs/DOM/event.explicitOriginalTarget">event.explicitOriginalTarget</a></code></td>
<td><code><a href="/en-US/docs/Web/API/Event/explicitOriginalTarget">event.explicitOriginalTarget</a></code></td>
<td>{{ Source("/dom/webidl/Event.webidl", "Event.webidl") }}</td>
<td>{{ Non-standard_inline() }} If the event was retargeted for some reason other than an anonymous boundary crossing, this will be set to the target before the retargeting occurs. For example, mouse events are retargeted to their parent node when they happen over text nodes ({{ Bug("185889") }}), and in that case <code>.target</code> will show the parent and <code>.explicitOriginalTarget</code> will show the text node.<br>
Unlike <code>.originalTarget</code>, <code>.explicitOriginalTarget</code> will never contain anonymous content.</td>
</tr>
<tr>
<td><code><a href="/en-US/docs/DOM/event.originalTarget">event.originalTarget</a></code></td>
<td><code><a href="/en-US/docs/Web/API/Event/originalTarget">event.originalTarget</a></code></td>
<td>{{ Source("/dom/webidl/Event.webidl", "Event.webidl") }}</td>
<td>{{ Non-standard_inline() }} The original target of the event, before any retargetings. See <a href="/en-US/docs/XBL/XBL_1.0_Reference/Anonymous_Content#Event_Flow_and_Targeting">Anonymous Content#Event_Flow_and_Targeting</a> for details.</td>
</tr>
Expand Down Expand Up @@ -150,8 +150,8 @@ <h3 id="Use_of_target_and_relatedTarget">Use of <code>target</code> and <code>re
<tbody>
<tr>
<th>Event type</th>
<th><a href="/en-US/docs/DOM/event.target">event.target</a></th>
<th><a href="/en-US/docs/DOM/event.relatedTarget">event.relatedTarget</a></th>
<th><a href="/en-US/docs/Web/API/Event/target">event.target</a></th>
<th><a href="/en-US/docs/Web/API/MouseEvent/relatedTarget">event.relatedTarget</a></th>
</tr>
<tr>
<td><code>mouseover</code></td>
Expand Down
6 changes: 3 additions & 3 deletions files/en-us/web/api/event/explicitoriginaltarget/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

<p>The explicit original target of the event. (Mozilla-specific)</p>

<p>If the event was <a href="/en-US/docs/DOM/event_retargeting">retargeted</a> for some reason other than an <a href="/en-US/docs/DOM/anonymous_boundary_crossing">anonymous boundary crossing</a>, this will be set to the target before the retargeting occurs. For example, mouse events are retargeted to their parent node when they happen over text nodes (see {{Bug(185889)}}), and in that case <code><a href="/en-US/docs/DOM/event.currentTarget">currentTarget</a></code> will show the parent and <code>explicitOriginalTarget</code> will show the text node.</p>
<p>If the event was <a href="/en-US/docs/DOM/event_retargeting">retargeted</a> for some reason other than an <a href="/en-US/docs/DOM/anonymous_boundary_crossing">anonymous boundary crossing</a>, this will be set to the target before the retargeting occurs. For example, mouse events are retargeted to their parent node when they happen over text nodes (see {{Bug(185889)}}), and in that case <code><a href="/en-US/docs/Web/API/Event/currentTarget">currentTarget</a></code> will show the parent and <code>explicitOriginalTarget</code> will show the text node.</p>

<p><code>explicitOriginalTarget</code> differs from <code><a href="/en-US/docs/DOM/event.originalTarget">originalTarget</a></code> in that it will never contain <a href="/en-US/docs/DOM/anonymous_content">anonymous content</a>.</p>
<p><code>explicitOriginalTarget</code> differs from <code><a href="/en-US/docs/Web/API/Event/originalTarget">originalTarget</a></code> in that it will never contain <a href="/en-US/docs/DOM/anonymous_content">anonymous content</a>.</p>

<h2 id="Example">Example</h2>

Expand Down Expand Up @@ -46,5 +46,5 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li><a href="/en-US/docs/DOM/event/Comparison_of_Event_Targets">Comparison of Event Targets</a></li>
<li><a href="/en-US/docs/Web/API/Event/Comparison_of_Event_Targets">Comparison of Event Targets</a></li>
</ul>
6 changes: 3 additions & 3 deletions files/en-us/web/api/event/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<p><strong>Note:</strong> One element can have several such handlers, even for the exact same event—particularly if separate, independent code modules attach them, each for its own independent purposes. (For example, a webpage with an advertising-module and statistics-module both monitoring video-watching.)</p>
</div>

<p>When there are many nested elements, each with its own handler(s), event processing can become very complicated—especially where a parent element receives the very same event as its child elements because "spatially" they overlap so the event technically occurs in both, and the processing order of such events depends on the <a href="/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture">Event bubbling and capture</a> settings of each handler triggered.</p>
<p>When there are many nested elements, each with its own handler(s), event processing can become very complicated—especially where a parent element receives the very same event as its child elements because "spatially" they overlap so the event technically occurs in both, and the processing order of such events depends on the <a href="/en-US/docs/Learn/JavaScript/Building_blocks/Events#event_bubbling_and_capture">Event bubbling and capture</a> settings of each handler triggered.</p>

<h2 id="Introduction">Interfaces based on Event</h2>

Expand Down Expand Up @@ -194,7 +194,7 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li>Types of events available: <a href="/en-US/docs/Web/Reference/Events">Event reference</a></li>
<li>Types of events available: <a href="/en-US/docs/Web/Events">Event reference</a></li>
<li><a href="/en-US/docs/Web/API/Event/Comparison_of_Event_Targets">Comparison of Event Targets</a> (<code>target</code> vs <code>currentTarget</code> vs <code>relatedTarget</code> vs <code>originalTarget</code>)</li>
<li><a href="/en-US/docs/Web/Guide/DOM/Events/Creating_and_triggering_events">Creating and triggering custom events</a></li>
<li><a href="/en-US/docs/Web/Guide/Events/Creating_and_triggering_events">Creating and triggering custom events</a></li>
</ul>
4 changes: 2 additions & 2 deletions files/en-us/web/api/event/msconverturl/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
slug: Web/API/Event/msConvertURL
tags:
- API
- 'API:Microsoft Extensions'
- API:Microsoft Extensions
- Method
- Non-standard
- Reference
Expand Down Expand Up @@ -78,5 +78,5 @@ <h3 id="Example">Example</h3>
<h2 id="See_also">See also</h2>

<ul>
<li><a href="/en-US/docs/Web/API/Microsoft_API_extensions">Microsoft API extensions </a></li>
<li><a href="/en-US/docs/Web/API/Microsoft_Extensions">Microsoft API extensions </a></li>
</ul>
2 changes: 1 addition & 1 deletion files/en-us/web/api/event/originaltarget/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<p>Note: <code>originalTarget</code> may also be native anonymous content (see {{Bug("208427")}}), in which case it's useless for non-privileged code.</p>

<p>See also <a href="/en-US/docs/DOM/event/Comparison_of_Event_Targets">Comparison of Event Targets</a></p>
<p>See also <a href="/en-US/docs/Web/API/Event/Comparison_of_Event_Targets">Comparison of Event Targets</a></p>

<h2 id="Example">Example</h2>

Expand Down
12 changes: 6 additions & 6 deletions files/en-us/web/api/event/preventdefault/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
title: Event.preventDefault()
slug: Web/API/Event/preventDefault
tags:
- API
- DOM
- Event
- Method
- Reference
- API
- DOM
- Event
- Method
- Reference
---
<div>{{apiref("DOM")}}</div>

Expand Down Expand Up @@ -62,7 +62,7 @@ <h3 id="Stopping_keystrokes_from_reaching_an_edit_field">Stopping keystrokes fro

<p>The following example demonstrates how invalid text input can be stopped from reaching
the input field with <code>preventDefault()</code>. Nowadays, you should usually use <a
href="/en-US/docs/Learn/HTML/Forms/Form_validation">native HTML form validation</a>
href="/en-US/docs/Learn/Forms/Form_validation">native HTML form validation</a>
instead.</p>

<h4 id="HTML_2">HTML</h4>
Expand Down
20 changes: 10 additions & 10 deletions files/en-us/web/api/event/stoppropagation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
title: Event.stopPropagation()
slug: Web/API/Event/stopPropagation
tags:
- API
- DOM
- Event
- Method
- Propagation
- Reference
- actions
- default
- stopPropagation
- API
- DOM
- Event
- Method
- Propagation
- Reference
- actions
- default
- stopPropagation
---
<div>{{APIRef("DOM")}}</div>

Expand All @@ -35,7 +35,7 @@ <h3 id="Return_value">Return value</h3>
<h2 id="Examples">Examples</h2>

<p>See Example 5: <a
href="/en-US/docs/DOM/DOM_Reference/Examples#example_5_event_propagation">Event
href="/en-US/docs/Web/API/Document_Object_Model/Examples#example_5_event_propagation">Event
Propagation</a> in the Examples chapter for a more detailed example of this method and
event propagation in the DOM.</p>

Expand Down
14 changes: 7 additions & 7 deletions files/en-us/web/api/event/target/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
title: Event.target
slug: Web/API/Event/target
tags:
- API
- DOM
- Event
- Property
- Reference
- delegation
- target
- API
- DOM
- Event
- Property
- Reference
- delegation
- target
---
<div>{{ApiRef("DOM")}}</div>

Expand Down
28 changes: 14 additions & 14 deletions files/en-us/web/api/eventlistener/handleevent/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
title: EventListener.handleEvent()
slug: Web/API/EventListener/handleEvent
tags:
- API
- Callback
- DOM
- DOM Events
- Event Callback
- Event Handler
- Event Processing
- EventListener
- Handling Events
- Method
- Reference
- events
- handleEvent
- API
- Callback
- DOM
- DOM Events
- Event Callback
- Event Handler
- Event Processing
- EventListener
- Handling Events
- Method
- Reference
- events
- handleEvent
---
<div>{{APIRef("DOM Events")}}</div>

Expand All @@ -26,7 +26,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js"><code><var>eventListener</var>.handleEvent(<var>event</var>);</code>
<pre class="brush: js">eventListener.handleEvent(event);
</pre>

<h3 id="Parameters">Parameters</h3>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/eventsource/error_event/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li><a href="https://developer.mozilla.org/en/Server-sent_events/Using_server-sent_events">Using server-sent events</a></li>
<li><a href="/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events">Using server-sent events</a></li>
<li><code><a href="/en-US/docs/Web/API/EventSource/open_event">open</a></code></li>
<li><code><a href="/en-US/docs/Web/API/EventSource/message_event">message</a></code></li>
</ul>
2 changes: 1 addition & 1 deletion files/en-us/web/api/eventsource/message_event/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li><a href="https://developer.mozilla.org/en/Server-sent_events/Using_server-sent_events">Using server-sent events</a></li>
<li><a href="/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events">Using server-sent events</a></li>
<li><code><a href="/en-US/docs/Web/API/EventSource/open_event">open</a></code></li>
<li><code><a href="/en-US/docs/Web/API/EventSource/error_event">error</a></code></li>
</ul>
2 changes: 1 addition & 1 deletion files/en-us/web/api/eventsource/open_event/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li><a href="https://developer.mozilla.org/en/Server-sent_events/Using_server-sent_events">Using server-sent events</a></li>
<li><a href="/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events">Using server-sent events</a></li>
<li>{{event("open")}}</li>
<li>{{event("error")}}</li>
<li>{{event("message")}}</li>
Expand Down
14 changes: 7 additions & 7 deletions files/en-us/web/api/eventtarget/dispatchevent/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
title: EventTarget.dispatchEvent()
slug: Web/API/EventTarget/dispatchEvent
tags:
- API
- DOM
- DOM Element Methods
- Gecko
- Method
- API
- DOM
- DOM Element Methods
- Gecko
- Method
---
<p>{{APIRef("DOM Events")}}</p>

Expand Down Expand Up @@ -62,11 +62,11 @@ <h2 id="Notes">Notes</h2>
can be created using <a href="/en-US/docs/Web/API/Event/Event">Event constructor</a>.
</p>

<p>See also the <a href="/en-US/docs/DOM/event">Event object reference</a>.</p>
<p>See also the <a href="/en-US/docs/Web/API/Event">Event object reference</a>.</p>

<h2 id="Example">Example</h2>

<p>See <a href="/en-US/docs/Web/Guide/DOM/Events/Creating_and_triggering_events">Creating
<p>See <a href="/en-US/docs/Web/Guide/Events/Creating_and_triggering_events">Creating
and triggering events</a>.</p>

<h2 id="Specifications">Specifications</h2>
Expand Down
6 changes: 3 additions & 3 deletions files/en-us/web/api/eventtarget/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<p>{{domxref("Element")}}, {{domxref("Document")}}, and {{domxref("Window")}} are the most common event targets, but other objects can be event targets, too. For example {{domxref("XMLHttpRequest")}}, {{domxref("AudioNode")}}, {{domxref("AudioContext")}}, and others.</p>

<p>Many event targets (including elements, documents, and windows) also support setting <a href="/en-US/docs/Web/Guide/DOM/Events/Event_handlers">event handlers</a> via <code>on<var>event</var></code> properties and attributes.</p>
<p>Many event targets (including elements, documents, and windows) also support setting <a href="/en-US/docs/Web/Guide/Events/Event_handlers">event handlers</a> via <code>on<var>event</var></code> properties and attributes.</p>

<p>{{InheritanceDiagram}}</p>

Expand Down Expand Up @@ -125,7 +125,7 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li><a href="/en-US/docs/Web/Reference/Events">Event reference</a> - the events available in the platform.</li>
<li><a href="/en-US/docs/Web/Guide/DOM/Events">Event developer guide</a></li>
<li><a href="/en-US/docs/Web/Events">Event reference</a> - the events available in the platform.</li>
<li><a href="/en-US/docs/Web/Guide/Events">Event developer guide</a></li>
<li>{{domxref("Event")}} interface</li>
</ul>
4 changes: 2 additions & 2 deletions files/en-us/web/api/extendableevent/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
---
<div>{{APIRef("Service Workers API")}}</div>

<p>The <strong><code>ExtendableEvent</code></strong> interface extends the lifetime of the <code><a href="/en-US/docs/Web/API/ServiceWorkerGlobalScope/install">install</a></code> and <code><a href="/en-US/docs/Web/API/ServiceWorkerGlobalScope/activate">activate</a></code> events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like {{domxref("FetchEvent")}}) are not dispatched until it upgrades database schemas and deletes the outdated cache entries.</p>
<p>The <strong><code>ExtendableEvent</code></strong> interface extends the lifetime of the <code><a href="/en-US/docs/Web/API/ServiceWorkerGlobalScope/install_event">install</a></code> and <code><a href="/en-US/docs/Web/API/ServiceWorkerGlobalScope/activate_event">activate</a></code> events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like {{domxref("FetchEvent")}}) are not dispatched until it upgrades database schemas and deletes the outdated cache entries.</p>

<p>If {{domxref("ExtendableEvent.waitUntil","waitUntil()")}} is called outside of the <code>ExtendableEvent</code> handler, the browser should throw an <code>InvalidStateError</code>; note also that multiple calls will stack up, and the resulting promises will be added to the list of <a href="https://w3c.github.io/ServiceWorker/#extendableevent-extend-lifetime-promises">extend lifetime promises</a>.</p>

Expand Down Expand Up @@ -48,7 +48,7 @@ <h2 id="Methods">Methods</h2>
<dl>
<dt>{{domxref("ExtendableEvent.waitUntil", "ExtendableEvent.waitUntil()")}}</dt>
<dd>
<p>Extends the lifetime of the event.  It is intended to be called in the <code><a href="/en-US/docs/Web/API/ServiceWorkerGlobalScope/install">install</a></code> {{domxref("EventHandler")}} for the {{domxref("ServiceWorkerRegistration.installing", "installing")}} worker and on the <code><a href="/en-US/docs/Web/API/ServiceWorkerGlobalScope/activate">activate</a></code> {{domxref("EventHandler")}} for the {{domxref("ServiceWorkerRegistration.active", "active")}} worker.</p>
<p>Extends the lifetime of the event.  It is intended to be called in the <code><a href="/en-US/docs/Web/API/ServiceWorkerGlobalScope/install_event">install</a></code> {{domxref("EventHandler")}} for the {{domxref("ServiceWorkerRegistration.installing", "installing")}} worker and on the <code><a href="/en-US/docs/Web/API/ServiceWorkerGlobalScope/activate_event">activate</a></code> {{domxref("EventHandler")}} for the {{domxref("ServiceWorkerRegistration.active", "active")}} worker.</p>
</dd>
</dl>

Expand Down

0 comments on commit 8f24127

Please sign in to comment.