You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: files/en-us/learn_web_development/core/frameworks_libraries/angular_building/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ Because these files are static, you can host them on any web server capable of s
54
54
- Java
55
55
- .NET
56
56
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).
> 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.
14
14
>
15
15
> 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.
17
17
18
18
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.
Copy file name to clipboardExpand all lines: files/en-us/web/api/popover_api/using_interest_invokers/index.md
+27-23Lines changed: 27 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ page-type: guide
10
10
11
11
## Concepts
12
12
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).
14
14
15
15
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.
16
16
@@ -32,7 +32,7 @@ Creating an interest invoker declaratively has the following two requirements:
32
32
- 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.
33
33
34
34
> [!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.
36
36
37
37
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.
38
38
@@ -48,8 +48,10 @@ Let's look at a simple example. Here, the **invoker element** is a link, and the
@@ -75,11 +77,11 @@ The value of the `popover` attribute doesn't affect the popover's behavior in th
75
77
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.
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.
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).
152
154
153
155
```css live-sample___interest-invoker-styling
154
-
#mytooltip {
156
+
#my-tooltip {
155
157
position-area: bottom;
156
158
}
157
159
```
158
160
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.
160
162
161
163
```css live-sample___interest-invoker-styling
162
-
#mytooltip:interest-target {
164
+
#my-tooltip:interest-target {
163
165
border-style: dashed;
164
166
}
165
167
```
@@ -180,13 +182,15 @@ Interest invokers have an associated JavaScript API that lets you query the elem
180
182
181
183
### Detecting support for interest invokers
182
184
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.
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
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.
Copy file name to clipboardExpand all lines: files/en-us/web/css/reference/properties/animation-range-end/index.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,11 +91,11 @@ In this example, the `animation-range-end` is applied to an element animated via
91
91
92
92
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.
93
93
94
-
```html
95
-
<div class="animatedElement"></div>
94
+
```html-nolint
95
+
<div class="animatedElement">
96
96
```
97
97
98
-
```html hidden
98
+
```html-nolint hidden
99
99
<p>
100
100
Adipiscing enim eu turpis egestas pretium aenean pharetra magna ac. Arcu
101
101
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
106
106
euismod nisi. Eget egestas purus viverra accumsan in nisl nisi scelerisque.
107
107
Netus et malesuada fames ac.
108
108
</p>
109
-
<p></p>
109
+
<p>
110
110
```
111
111
112
112
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.
Copy file name to clipboardExpand all lines: files/en-us/web/css/reference/properties/animation-range-start/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ animation-range-start: unset;
44
44
## Description
45
45
46
46
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.
48
48
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.
49
49
50
50
The `animation-range-start` is included in the {{cssxref("animation")}} shorthand as areset-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 seta 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`.
Copy file name to clipboardExpand all lines: files/en-us/web/css/reference/selectors/_colon_interest-target/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ The markup includes a {{htmlelement("button")}} and a {{htmlelement("p")}}. We s
37
37
38
38
#### CSS
39
39
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.
0 commit comments