Skip to content

Commit 995f8bc

Browse files
mdn-botJosh-Cena
andauthored
fix: auto-cleanup by bot (mdn#42305)
* chore: auto-fix Markdownlint, Prettier, and front-matter issues * Fix typos * More fixes --------- Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
1 parent 06ab986 commit 995f8bc

14 files changed

Lines changed: 47 additions & 38 deletions

File tree

.vscode/dictionaries/code-entities.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ indexeddb-examples
298298
indexifembedded
299299
inputreport
300300
inputsourceschange
301+
interestfor
301302
intitle
302303
intl.uidirection.locale
303304
intrinsicsize
@@ -383,6 +384,7 @@ localecho
383384
localstore
384385
longdiv
385386
longtask
387+
loseinterest
386388
lowdelay
387389
lowp
388390
lquote
@@ -521,6 +523,8 @@ ondispose
521523
ondownloadprogress
522524
onefive
523525
ongesturestart
526+
oninterest
527+
onloseinterest
524528
onnavigate
525529
onnavigateerror
526530
onnavigatesuccess

.vscode/dictionaries/terms-abbreviations.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,7 @@ ungroup
861861
ungrouping
862862
unguaranteed
863863
unhovered
864+
unhovering
864865
uninterpolated
865866
unintuitively
866867
unioned

files/en-us/learn_web_development/core/frameworks_libraries/angular_building/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Because these files are static, you can host them on any web server capable of s
5454
- Java
5555
- .NET
5656

57-
You can use any backend such as [Firebase](https://firebase.google.com/docs/hosting), [Google Cloud](https://cloud.google.com/solutions/web-hosting), or [App Engine](https://cloud.google.com/appengine/docs/standard/hosting-a-static-website).
57+
You can use any backend such as [Firebase](https://firebase.google.com/docs/hosting), [Google Cloud](https://cloud.google.com/solutions/web-hosting), or [App Engine](https://docs.cloud.google.com/appengine/docs/standard/hosting-a-static-website).
5858

5959
### Host locally
6060

files/en-us/web/api/element/setattributens/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ browser-compat: api.Element.setAttributeNS
1313
> APIs like this are known as [injection sinks](/en-US/docs/Web/API/Trusted_Types_API#concepts_and_usage), and are potentially a vector for [cross-site scripting (XSS)](/en-US/docs/Web/Security/Attacks/XSS) attacks, if the value originally came from an attacker.
1414
>
1515
> You can mitigate this risk by always passing the appropriate trusted type object ({{domxref("TrustedHTML")}}, {{domxref("TrustedScript")}}, or {{domxref("TrustedScriptURL")}}) instead of strings for those attributes that require them, and [enforcing trusted types](/en-US/docs/Web/API/Trusted_Types_API#using_a_csp_to_enforce_trusted_types).
16-
> See [Security considerations](#/en-US/docs/Web/API/Element/setAttribute#security_considerations) in {{domxref("Element.setAttribute())}} for more information.
16+
> See [Security considerations](/en-US/docs/Web/API/Element/setAttribute#security_considerations) in {{domxref("Element.setAttribute())}} for more information.
1717
1818
The **`setAttributeNS()`** method of the {{domxref("Element")}} interface adds a new attribute or changes the value of an attribute with the given namespace and name.
1919

files/en-us/web/api/htmlareaelement/interestforelement/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ In this example, we use an `<area>` element's `interestForElement` property to s
3030
We include an `<area>` element and a `<div>` element. We turn the `<div>` element into a popover by setting a `popover` attribute on it.
3131

3232
```html live-sample___basic-interest-invoker
33-
<map>
34-
<area href="#" shape="default" />
33+
<map name="example-map" id="example-map">
34+
<area href="#" shape="default" alt="Example area" />
3535
</map>
3636
<div id="mypopover" popover>I am a <code>&lt;div&gt;</code> element.</div>
3737
```

files/en-us/web/api/popover_api/using_interest_invokers/index.md

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ page-type: guide
1010

1111
## Concepts
1212

13-
The Popover API provides the functionality to display a popover when a related control element (the **invoker**) is activated, for example, when it is clicked. This feature is useful for displaying UI elements such as modals and information panels. You can [create popovers declaratively](/en-US/docs/Web/API/Popover_API/Using#creating_declarative_popovers) by using the [`popover`](/en-US/docs/Web/HTML/Reference/Elements/button#popover) attribute together with either [`popovertarget`](/en-US/docs/Web/HTML/Reference/Elements/button#popovertarget) or [`commandfor`](/en-US/docs/Web/HTML/Reference/Elements/button#commandfor).
13+
The Popover API provides the functionality to display a popover when a related control element (the **invoker**) is activated, for example, when it is clicked. This feature is useful for displaying UI elements such as modals and information panels. You can [create popovers declaratively](/en-US/docs/Web/API/Popover_API/Using#creating_declarative_popovers) by using the [`popover`](/en-US/docs/Web/HTML/Reference/Global_attributes/popover) attribute together with either [`popovertarget`](/en-US/docs/Web/HTML/Reference/Elements/button#popovertarget) or [`commandfor`](/en-US/docs/Web/HTML/Reference/Elements/button#commandfor).
1414

1515
In addition to these activation-based popovers, there is a common need to display a popover when a control element is hovered or focused – interactions that indicate user interest. For example, many social and community sites let users hover over a link to a person's or group's profile page to show a popover with more information. This quick preview helps users decide whether they want to visit the full page. Such popovers may also contain quick actions, such as "Follow" or "Subscribe to group", allowing users to take an action without losing their current context.
1616

@@ -32,7 +32,7 @@ Creating an interest invoker declaratively has the following two requirements:
3232
- A **target element**: This is the element that is affected or controlled when interest is gained or lost. The target element must have an `id`, and it can be just about any element type. Giving this element a `popover` attribute turns it into a popover.
3333

3434
> [!NOTE]
35-
> You can also set the target element programmatically by setting the invoker element's `interestForElement` DOM property to a reference to the target element. For more information, see [The interest invoker JavaScript API](#the_interest_invoker_javascript_api) section later in this guide.
35+
> You can also set the target element programmatically by setting the invoker element's `interestForElement` DOM property to a reference to the target element. For more information, see [JavaScript API for interest invokers](#javascript_api_for_interest_invokers) section later in this guide.
3636
3737
Let's look at a simple example. Here, the **invoker element** is a link, and the **target element** is a paragraph with the `popover` attribute.
3838

@@ -48,8 +48,10 @@ Let's look at a simple example. Here, the **invoker element** is a link, and the
4848
```
4949

5050
```js hidden live-sample___basic-interest-invoker live-sample___interest-invoker-popover-interaction live-sample___interest-invoker-styling live-sample___interest-invoker-api live-sample___non-popover live-sample___link-preview-popover
51-
const supported =
52-
HTMLButtonElement.prototype.hasOwnProperty("interestForElement");
51+
const supported = Object.hasOwn(
52+
HTMLButtonElement.prototype,
53+
"interestForElement",
54+
);
5355
if (!supported) {
5456
document.querySelector("html").classList.add("no-interest-invokers");
5557
}
@@ -75,11 +77,11 @@ The value of the `popover` attribute doesn't affect the popover's behavior in th
7577
You can combine interest invokers with regular popovers on the same control element. In the following example, a {{htmlelement("button")}} element is set up as an interest invoker using the `interestfor` attribute, meaning it will show a tooltip when the user shows interest in it. If the button is clicked, it will show or hide a different popover referenced by the `commandfor` attribute. The [`command`](/en-US/docs/Web/HTML/Reference/Elements/button#command) attribute is set to `toggle-popover`, allowing the button to be pressed multiple times to toggle the popover between its shown and hidden states.
7678

7779
```css hidden live-sample___interest-invoker-popover-interaction
78-
#mytooltip {
80+
#my-tooltip {
7981
position-area: right;
8082
}
8183

82-
#myinfobox {
84+
#my-infobox {
8385
position-area: bottom;
8486
}
8587
```
@@ -88,14 +90,14 @@ You can combine interest invokers with regular popovers on the same control elem
8890
<p>
8991
Some content including a
9092
<button
91-
interestfor="mytooltip"
92-
commandfor="myinfobox"
93+
interestfor="my-tooltip"
94+
commandfor="my-infobox"
9395
command="toggle-popover">
9496
button
9597
</button>
9698
</p>
97-
<p id="mytooltip" popover="hint">A hover tooltip</p>
98-
<p id="myinfobox" popover>
99+
<p id="my-tooltip" popover="hint">A hover tooltip</p>
100+
<p id="my-infobox" popover>
99101
An infobox that also contains some control buttons<br />
100102
<button>Button 1</button> <button>Button 2</button>
101103
</p>
@@ -122,10 +124,10 @@ We've defined two buttons and a tooltip. The tooltip is shown or hidden when the
122124

123125
```html live-sample___interest-invoker-styling
124126
<p>
125-
<button interestfor="mytooltip">Button 1</button>
126-
<button interestfor="mytooltip">Button 2</button>
127+
<button interestfor="my-tooltip">Button 1</button>
128+
<button interestfor="my-tooltip">Button 2</button>
127129
</p>
128-
<p id="mytooltip" popover="hint">A hover tooltip</p>
130+
<p id="my-tooltip" popover="hint">A hover tooltip</p>
129131
```
130132

131133
In the CSS, we've set an `interest-delay` of `1s 2s` on the `<button>` — this creates a delay of 1 second before the tooltip appears when the user shows interest, and a delay of 2 seconds before it disappears when the user loses interest. We've also used the `button:interest-source` selector to change the {{cssxref("background-color")}} of the buttons to `orange` when interest is shown.
@@ -151,15 +153,15 @@ p:has(button:interest-source) button {
151153
We've also set a {{cssxref("position-area")}} of `bottom` on the tooltip so that it appears below the button. This is possible because associating any popover with its interest invoker creates an implicit anchor reference between them (see [Popover anchor positioning](/en-US/docs/Web/API/Popover_API/Using#popover_anchor_positioning) for more details).
152154

153155
```css live-sample___interest-invoker-styling
154-
#mytooltip {
156+
#my-tooltip {
155157
position-area: bottom;
156158
}
157159
```
158160

159-
Finally, we've used the `#mytooltip:interest-target` selector to set a dashed border on the popover when interest is shown.
161+
Finally, we've used the `#my-tooltip:interest-target` selector to set a dashed border on the popover when interest is shown.
160162

161163
```css live-sample___interest-invoker-styling
162-
#mytooltip:interest-target {
164+
#my-tooltip:interest-target {
163165
border-style: dashed;
164166
}
165167
```
@@ -180,13 +182,15 @@ Interest invokers have an associated JavaScript API that lets you query the elem
180182

181183
### Detecting support for interest invokers
182184

183-
One of the uses of the API is feature detection. The simplest way to check whether interest invokers are supported is to use the {{jsxref("Object.hasOwnProperty()")}} method on one of the interface types to see if the `interestForElement` property is available.
185+
One of the uses of the API is feature detection. The simplest way to check whether interest invokers are supported is to use the {{jsxref("Object.hasOwn()")}} method on one of the interface types to see if the `interestForElement` property is available.
184186

185187
For example:
186188

187189
```js
188-
const supported =
189-
HTMLButtonElement.prototype.hasOwnProperty("interestForElement");
190+
const supported = Object.hasOwn(
191+
HTMLButtonElement.prototype,
192+
"interestForElement",
193+
);
190194
```
191195

192196
All the examples in this guide use this technique to detect support. If the return value is `false`, indicating that the feature is not supported, we add a class to the {{htmlelement("html")}} element:
@@ -219,25 +223,25 @@ Let's look at a basic example that shows the API features in action. This exampl
219223
Here's some links:
220224
<a href="#">Link 1</a>
221225
<a href="#">Link 2</a>
222-
<a href="#"">Link 3</a>
226+
<a href="#">Link 3</a>
223227
</p>
224-
<p id="mytooltip" popover="hint">A hover toolip</p>
228+
<p id="my-tooltip" popover="hint">A hover tooltip</p>
225229
```
226230

227231
```css hidden live-sample___interest-invoker-api
228232
html {
229233
font-family: sans-serif;
230234
}
231235

232-
#mytooltip {
236+
#my-tooltip {
233237
position-area: bottom;
234238
}
235239
```
236240

237241
In the JavaScript, we get references to the popover and the three links. We then loop through the links and set each link's {{domxref("HTMLAnchorElement.interestForElement", "interestForElement")}} property to reference the popover element. This programmatically sets up the interest invoker-target relationship between the popover and each link.
238242

239243
```js live-sample___interest-invoker-api
240-
const tooltip = document.getElementById("mytooltip");
244+
const tooltip = document.getElementById("my-tooltip");
241245
const links = document.querySelectorAll("a");
242246
links.forEach((link) => (link.interestForElement = tooltip));
243247
```

files/en-us/web/css/reference/properties/animation-range-end/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ In this example, the `animation-range-end` is applied to an element animated via
9191

9292
In the middle of a long block of text, we've included an element that we'll animate. We've added a lot of text to ensure that the content overflows its container; the extra text is hidden here for brevity.
9393

94-
```html
95-
<div class="animatedElement"></div>
94+
```html-nolint
95+
<div class="animatedElement">
9696
```
9797

98-
```html hidden
98+
```html-nolint hidden
9999
<p>
100100
Adipiscing enim eu turpis egestas pretium aenean pharetra magna ac. Arcu
101101
cursus vitae congue mauris rhoncus aenean vel. Sit amet cursus sit amet
@@ -106,7 +106,7 @@ In the middle of a long block of text, we've included an element that we'll anim
106106
euismod nisi. Eget egestas purus viverra accumsan in nisl nisi scelerisque.
107107
Netus et malesuada fames ac.
108108
</p>
109-
<p></p>
109+
<p>
110110
```
111111

112112
We've also included a checkbox that will toggle the {{cssxref("animation-fill-mode")}} property, so you can see how this property affects animations with shortened timelines.

files/en-us/web/css/reference/properties/animation-range-start/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ animation-range-start: unset;
4444
## Description
4545

4646
Allowed values for the `animation-range-start` property are `normal`, a {{cssxref("length-percentage")}}, a `<timeline-range-name>`, or a `<timeline-range-name>` followed by a `<length-percentage>`. If the [`<timeline-range-name>`](/en-US/docs/Web/CSS/Reference/Values/timeline-range-name) value does not include a `<length-percentage>`, the percentage defaults to `0%`.
47-
See [`animation-range`](/en-US/docs/Web/CSS/animation-range) for a detailed description of the available values.
47+
See [`animation-range`](/en-US/docs/Web/CSS/Reference/Properties/animation-range) for a detailed description of the available values.
4848
Also check out the [View progress timeline visualizer](https://scroll-driven-animations.style/tools/view-timeline/ranges/), which shows what the different values mean in an easy-to-follow visual format.
4949

5050
The `animation-range-start` is included in the {{cssxref("animation")}} shorthand as a reset-only value. This means that using the `animation` shorthand resets any previously declared `animation-range-start` value of equal or lower specificity to `normal`; the shorthand cannot be used to set a new `animation-range-start` value. When creating [CSS scroll-driven animations](/en-US/docs/Web/CSS/Guides/Scroll-driven_animations), you should declare `animation-range-start` _after_ declaring any `animation` shorthand to avoid resetting the value to `normal`.

files/en-us/web/css/reference/selectors/_colon_interest-source/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The markup includes a {{htmlelement("button")}} and a {{htmlelement("p")}}. We s
3232

3333
```html live-sample___interest-source
3434
<button interestfor="mypopover">Button</button>
35-
<p id="mypopover" popover>A hover toolip</p>
35+
<p id="mypopover" popover>A hover tooltip</p>
3636
```
3737

3838
#### CSS

files/en-us/web/css/reference/selectors/_colon_interest-target/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The markup includes a {{htmlelement("button")}} and a {{htmlelement("p")}}. We s
3737

3838
#### CSS
3939

40-
In the CSS, we specify a rule with an `:interest-target` selector, which will apply a specific set of sttyles to the `<p>` element when interest is shown in the `<button>`. We also apply some other styles to the `<button>`, which we've hidden for brevity.
40+
In the CSS, we specify a rule with an `:interest-target` selector, which will apply a specific set of styles to the `<p>` element when interest is shown in the `<button>`. We also apply some other styles to the `<button>`, which we've hidden for brevity.
4141

4242
```css hidden live-sample___interest-target
4343
body {

0 commit comments

Comments
 (0)