From 8f241271d726416c6e7cf283dc28c8e91367ce77 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 14 Mar 2021 23:42:01 -0400 Subject: [PATCH] fix: flaws in web/api/e* batch 2 (#3043) --- files/en-us/web/api/encoding_api/index.html | 2 +- files/en-us/web/api/errorevent/index.html | 2 +- files/en-us/web/api/event/bubbles/index.html | 2 +- .../comparison_of_event_targets/index.html | 14 +++++----- .../event/explicitoriginaltarget/index.html | 6 ++-- files/en-us/web/api/event/index.html | 6 ++-- .../web/api/event/msconverturl/index.html | 4 +-- .../web/api/event/originaltarget/index.html | 2 +- .../web/api/event/preventdefault/index.html | 12 ++++---- .../web/api/event/stoppropagation/index.html | 20 ++++++------- files/en-us/web/api/event/target/index.html | 14 +++++----- .../api/eventlistener/handleevent/index.html | 28 +++++++++---------- .../api/eventsource/error_event/index.html | 2 +- .../api/eventsource/message_event/index.html | 2 +- .../web/api/eventsource/open_event/index.html | 2 +- .../api/eventtarget/dispatchevent/index.html | 14 +++++----- files/en-us/web/api/eventtarget/index.html | 6 ++-- .../en-us/web/api/extendableevent/index.html | 4 +-- 18 files changed, 71 insertions(+), 71 deletions(-) diff --git a/files/en-us/web/api/encoding_api/index.html b/files/en-us/web/api/encoding_api/index.html index 76a69cc93b823ad..c11d3dddf07d75a 100644 --- a/files/en-us/web/api/encoding_api/index.html +++ b/files/en-us/web/api/encoding_api/index.html @@ -30,7 +30,7 @@

Tutorials & tools

Specifications

diff --git a/files/en-us/web/api/errorevent/index.html b/files/en-us/web/api/errorevent/index.html index 59bd3d36bf0e7b2..2c82ef3ffe4345f 100644 --- a/files/en-us/web/api/errorevent/index.html +++ b/files/en-us/web/api/errorevent/index.html @@ -71,5 +71,5 @@

Browser compatibility

See also

diff --git a/files/en-us/web/api/event/bubbles/index.html b/files/en-us/web/api/event/bubbles/index.html index 8632539fd6c3987..b6f74a872c35db3 100644 --- a/files/en-us/web/api/event/bubbles/index.html +++ b/files/en-us/web/api/event/bubbles/index.html @@ -19,7 +19,7 @@

The bubbles read-only property of the {{domxref("Event")}} interface indicates whether the event bubbles up through the DOM or not.

-

Note: See Event bubbling and capture for more information on bubbling.

+

Note: See Event bubbling and capture for more information on bubbling.

Syntax

diff --git a/files/en-us/web/api/event/comparison_of_event_targets/index.html b/files/en-us/web/api/event/comparison_of_event_targets/index.html index f4014c5fa9d1a6a..0a388b355088de5 100644 --- a/files/en-us/web/api/event/comparison_of_event_targets/index.html +++ b/files/en-us/web/api/event/comparison_of_event_targets/index.html @@ -25,7 +25,7 @@

Event targets

Purpose - event.target + event.target DOM Event Interface

The DOM element on the lefthand side of the call that triggered this event, eg:

@@ -36,23 +36,23 @@

Event targets

- event.currentTarget + event.currentTarget DOM Event Interface The EventTarget whose EventListeners are currently being processed. As the event capturing and bubbling occurs, this value changes. - event.relatedTarget + event.relatedTarget DOM MouseEvent Interface Identifies a secondary target for the event. - event.explicitOriginalTarget + event.explicitOriginalTarget {{ Source("/dom/webidl/Event.webidl", "Event.webidl") }} {{ 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 .target will show the parent and .explicitOriginalTarget will show the text node.
Unlike .originalTarget, .explicitOriginalTarget will never contain anonymous content. - event.originalTarget + event.originalTarget {{ Source("/dom/webidl/Event.webidl", "Event.webidl") }} {{ Non-standard_inline() }} The original target of the event, before any retargetings. See Anonymous Content#Event_Flow_and_Targeting for details. @@ -150,8 +150,8 @@

Use of target and re Event type - event.target - event.relatedTarget + event.target + event.relatedTarget mouseover diff --git a/files/en-us/web/api/event/explicitoriginaltarget/index.html b/files/en-us/web/api/event/explicitoriginaltarget/index.html index e0d40747167d063..473bd2616ebb68c 100644 --- a/files/en-us/web/api/event/explicitoriginaltarget/index.html +++ b/files/en-us/web/api/event/explicitoriginaltarget/index.html @@ -13,9 +13,9 @@

The explicit original target of the event. (Mozilla-specific)

-

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 (see {{Bug(185889)}}), and in that case currentTarget will show the parent and explicitOriginalTarget will show the text node.

+

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 (see {{Bug(185889)}}), and in that case currentTarget will show the parent and explicitOriginalTarget will show the text node.

-

explicitOriginalTarget differs from originalTarget in that it will never contain anonymous content.

+

explicitOriginalTarget differs from originalTarget in that it will never contain anonymous content.

Example

@@ -46,5 +46,5 @@

Browser compatibility

See also

diff --git a/files/en-us/web/api/event/index.html b/files/en-us/web/api/event/index.html index 7a5a287de3cec2b..9c8b113e44c785d 100644 --- a/files/en-us/web/api/event/index.html +++ b/files/en-us/web/api/event/index.html @@ -25,7 +25,7 @@

Note: 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.)

-

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 Event bubbling and capture settings of each handler triggered.

+

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 Event bubbling and capture settings of each handler triggered.

Interfaces based on Event

@@ -194,7 +194,7 @@

Browser compatibility

See also

diff --git a/files/en-us/web/api/event/msconverturl/index.html b/files/en-us/web/api/event/msconverturl/index.html index 2db73fe07e465bb..b1e90890edce2ea 100644 --- a/files/en-us/web/api/event/msconverturl/index.html +++ b/files/en-us/web/api/event/msconverturl/index.html @@ -3,7 +3,7 @@ slug: Web/API/Event/msConvertURL tags: - API - - 'API:Microsoft Extensions' + - API:Microsoft Extensions - Method - Non-standard - Reference @@ -78,5 +78,5 @@

Example

See also

diff --git a/files/en-us/web/api/event/originaltarget/index.html b/files/en-us/web/api/event/originaltarget/index.html index acb692c8d17d9c6..44bc22415593ac2 100644 --- a/files/en-us/web/api/event/originaltarget/index.html +++ b/files/en-us/web/api/event/originaltarget/index.html @@ -19,7 +19,7 @@

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

-

See also Comparison of Event Targets

+

See also Comparison of Event Targets

Example

diff --git a/files/en-us/web/api/event/preventdefault/index.html b/files/en-us/web/api/event/preventdefault/index.html index 5013b5100840eba..e3e8c9300cb68f5 100644 --- a/files/en-us/web/api/event/preventdefault/index.html +++ b/files/en-us/web/api/event/preventdefault/index.html @@ -2,11 +2,11 @@ title: Event.preventDefault() slug: Web/API/Event/preventDefault tags: -- API -- DOM -- Event -- Method -- Reference + - API + - DOM + - Event + - Method + - Reference ---
{{apiref("DOM")}}
@@ -62,7 +62,7 @@

Stopping keystrokes fro

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

HTML

diff --git a/files/en-us/web/api/event/stoppropagation/index.html b/files/en-us/web/api/event/stoppropagation/index.html index 95ccef97c2d2891..522e50f655a39e5 100644 --- a/files/en-us/web/api/event/stoppropagation/index.html +++ b/files/en-us/web/api/event/stoppropagation/index.html @@ -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 ---
{{APIRef("DOM")}}
@@ -35,7 +35,7 @@

Return value

Examples

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

diff --git a/files/en-us/web/api/event/target/index.html b/files/en-us/web/api/event/target/index.html index f630833d1e7830a..6e4109e99d06ae2 100644 --- a/files/en-us/web/api/event/target/index.html +++ b/files/en-us/web/api/event/target/index.html @@ -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 ---
{{ApiRef("DOM")}}
diff --git a/files/en-us/web/api/eventlistener/handleevent/index.html b/files/en-us/web/api/eventlistener/handleevent/index.html index 77a23025246dec4..70cc3846d28c1dc 100644 --- a/files/en-us/web/api/eventlistener/handleevent/index.html +++ b/files/en-us/web/api/eventlistener/handleevent/index.html @@ -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 ---
{{APIRef("DOM Events")}}
@@ -26,7 +26,7 @@

Syntax

-
eventListener.handleEvent(event);
+
eventListener.handleEvent(event);
 

Parameters

diff --git a/files/en-us/web/api/eventsource/error_event/index.html b/files/en-us/web/api/eventsource/error_event/index.html index 9ffaac08b0c6305..0d777c9d9ab75b0 100644 --- a/files/en-us/web/api/eventsource/error_event/index.html +++ b/files/en-us/web/api/eventsource/error_event/index.html @@ -69,7 +69,7 @@

Browser compatibility

See also

diff --git a/files/en-us/web/api/eventsource/message_event/index.html b/files/en-us/web/api/eventsource/message_event/index.html index f2b0d2d44291984..1e2798fb0831d96 100644 --- a/files/en-us/web/api/eventsource/message_event/index.html +++ b/files/en-us/web/api/eventsource/message_event/index.html @@ -78,7 +78,7 @@

Browser compatibility

See also

diff --git a/files/en-us/web/api/eventsource/open_event/index.html b/files/en-us/web/api/eventsource/open_event/index.html index 8f2853f8f93beb4..48ea428af5e11a1 100644 --- a/files/en-us/web/api/eventsource/open_event/index.html +++ b/files/en-us/web/api/eventsource/open_event/index.html @@ -70,7 +70,7 @@

Browser compatibility

See also

    -
  • Using server-sent events
  • +
  • Using server-sent events
  • {{event("open")}}
  • {{event("error")}}
  • {{event("message")}}
  • diff --git a/files/en-us/web/api/eventtarget/dispatchevent/index.html b/files/en-us/web/api/eventtarget/dispatchevent/index.html index 8144e89147fd201..9d9f205bd55d817 100644 --- a/files/en-us/web/api/eventtarget/dispatchevent/index.html +++ b/files/en-us/web/api/eventtarget/dispatchevent/index.html @@ -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 ---

    {{APIRef("DOM Events")}}

    @@ -62,11 +62,11 @@

    Notes

    can be created using Event constructor.

    -

    See also the Event object reference.

    +

    See also the Event object reference.

    Example

    -

    See Creating +

    See Creating and triggering events.

    Specifications

    diff --git a/files/en-us/web/api/eventtarget/index.html b/files/en-us/web/api/eventtarget/index.html index 1d778953cc2e53f..d570c7741723954 100644 --- a/files/en-us/web/api/eventtarget/index.html +++ b/files/en-us/web/api/eventtarget/index.html @@ -14,7 +14,7 @@

    {{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.

    -

    Many event targets (including elements, documents, and windows) also support setting event handlers via onevent properties and attributes.

    +

    Many event targets (including elements, documents, and windows) also support setting event handlers via onevent properties and attributes.

    {{InheritanceDiagram}}

    @@ -125,7 +125,7 @@

    Browser compatibility

    See also

    diff --git a/files/en-us/web/api/extendableevent/index.html b/files/en-us/web/api/extendableevent/index.html index a1b5af561098cff..6400117b215dc81 100644 --- a/files/en-us/web/api/extendableevent/index.html +++ b/files/en-us/web/api/extendableevent/index.html @@ -14,7 +14,7 @@ ---
    {{APIRef("Service Workers API")}}
    -

    The ExtendableEvent interface extends the lifetime of the install and activate 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.

    +

    The ExtendableEvent interface extends the lifetime of the install and activate 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.

    If {{domxref("ExtendableEvent.waitUntil","waitUntil()")}} is called outside of the ExtendableEvent handler, the browser should throw an InvalidStateError; note also that multiple calls will stack up, and the resulting promises will be added to the list of extend lifetime promises.

    @@ -48,7 +48,7 @@

    Methods

    {{domxref("ExtendableEvent.waitUntil", "ExtendableEvent.waitUntil()")}}
    -

    Extends the lifetime of the event.  It is intended to be called in the install {{domxref("EventHandler")}} for the {{domxref("ServiceWorkerRegistration.installing", "installing")}} worker and on the activate {{domxref("EventHandler")}} for the {{domxref("ServiceWorkerRegistration.active", "active")}} worker.

    +

    Extends the lifetime of the event.  It is intended to be called in the install {{domxref("EventHandler")}} for the {{domxref("ServiceWorkerRegistration.installing", "installing")}} worker and on the activate {{domxref("EventHandler")}} for the {{domxref("ServiceWorkerRegistration.active", "active")}} worker.