Skip to content

Commit

Permalink
Remove SVG <discard> docs (#26856)
Browse files Browse the repository at this point in the history
  • Loading branch information
Elchi3 authored May 19, 2023
1 parent 62d47af commit 3cca389
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 129 deletions.
4 changes: 0 additions & 4 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -126754,10 +126754,6 @@
"Manuel_Strehl"
]
},
"Web/SVG/Element/discard": {
"modified": "2020-10-15T21:49:16.314Z",
"contributors": ["Tigt", "fscholz", "Sebastianz"]
},
"Web/SVG/Element/ellipse": {
"modified": "2020-10-15T21:11:04.607Z",
"contributors": [
Expand Down
38 changes: 2 additions & 36 deletions files/en-us/web/svg/attribute/begin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
title: begin
slug: Web/SVG/Attribute/begin
page-type: svg-attribute
spec-urls:
- https://svgwg.org/specs/animations/#DiscardElementBeginAttribute
- https://svgwg.org/specs/animations/#BeginAttribute
spec-urls: https://svgwg.org/specs/animations/#BeginAttribute
---

{{SVGRef}}

The **`begin`** attribute defines when an animation should begin or when an element should be discarded.
The **`begin`** attribute defines when an animation should begin.

The attribute value is a semicolon separated list of values. The interpretation of a list of start times is detailed in the SMIL specification in ["Evaluation of begin and end time lists"](https://www.w3.org/TR/2001/REC-smil-animation-20010904/#Timing-EvaluationOfBeginEndTimeLists). Each individual value can be one of the following: `<offset-value>`, `<syncbase-value>`, `<event-value>`, `<repeat-value>`, `<accessKey-value>`, `<wallclock-sync-value>` or the keyword `indefinite`.

Expand All @@ -18,7 +16,6 @@ You can use this attribute with the following SVG elements:
- {{SVGElement("animate")}}
- {{SVGElement("animateMotion")}}
- {{SVGElement("animateTransform")}}
- {{SVGElement("discard")}}
- {{SVGElement("set")}}

## animate, animateMotion, animateTransform, set
Expand Down Expand Up @@ -115,37 +112,6 @@ The `<begin-value-list>` is a semicolon-separated list of values. Each value can
- `indefinite`
- : The begin of the animation will be determined by a `beginElement()` method call or a hyperlink targeted to the element.

## discard

For {{SVGElement("discard")}}, `begin` defines when the target element will be discarded.

The `<discard>` element has an implicit simple duration of `indefinite`. As soon as the element's active duration starts, the element identified by the {{SVGAttr("href")}} attribute is discarded. The behavior is the same as if {{domxref("Node.removeChild()")}} were called on the parent of the target element with the target element as parameter.

After removal of the target element, the `<discard>` element is no longer useful, therefore it is also discarded after the target element's removal. If the `href` attribute has an invalid URL reference (e.g. the target element did not exist), the `<discard>` element itself is still removed after the activation.

Seeking backwards in the timeline doesn't re-insert the discarded elements. So, authors are encouraged to set the {{SVGAttr("playbackorder")}} attribute to `forwardonly` when using the `<discard>` element.

The `<discard>` element itself can be discarded prior to its activation, in which case it will never trigger the removal of its own target element.

<table class="properties">
<tbody>
<tr>
<th scope="row">Value</th>
<td><code>&#x3C;begin-value-list></code></td>
</tr>
<tr>
<th scope="row">Default value</th>
<td><code>0s</code></td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>No</td>
</tr>
</tbody>
</table>

The definition of `<begin-value-list>` is the [same as for the other animation elements](#animate_animatemotion_animatetransform_set).

## Examples

### Offset example
Expand Down
32 changes: 0 additions & 32 deletions files/en-us/web/svg/attribute/href/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ You can use this attribute with the following SVG elements:
- {{SVGElement("animate")}}
- {{SVGElement("animateMotion")}}
- {{SVGElement("animateTransform")}}
- {{SVGElement("discard")}}
- {{SVGElement("feImage")}}
- {{SVGElement("image")}}
- {{SVGElement("linearGradient")}}
Expand Down Expand Up @@ -109,37 +108,6 @@ Except for any SVG-specific rules explicitly mentioned in this specification, th
</tbody>
</table>

### discard

For {{SVGElement("discard")}}, `href` defines a URL referring the target element to discard. See the [definition of `href` on animation elements](#href_on_animation_elements) for details on identifying a target element.

> **Note:** Unlike other animation elements, the `<discard>` element does not support the deprecated {{SVGAttr("xlink:href")}} attribute.
Note that if the target element is not part of the current SVG document fragment, then whether the target element will be removed or not is defined by the host language.

If the `href` attribute is not provided, then the target element will be the immediate parent element of the `<discard>` element.

<table class="properties">
<tbody>
<tr>
<th scope="row">Value</th>
<td>
<code
><a href="/en-US/docs/Web/SVG/Content_type#URL">&#x3C;url></a></code
>
</td>
</tr>
<tr>
<th scope="row">Default value</th>
<td><em>None</em></td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>No</td>
</tr>
</tbody>
</table>

### feImage

For {{SVGElement("feImage")}}, `href` defines a URL referring to an image resource or to an element. If both, the {{SVGAttr("xlink:href")}} and the `href` attribute are specified, the latter overrides the former.
Expand Down
1 change: 0 additions & 1 deletion files/en-us/web/svg/attribute/systemlanguage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ You can use this attribute with the following SVG elements:
- {{SVGElement("clipPath")}}
- {{SVGElement("cursor")}}
- {{SVGElement("defs")}}
- {{SVGElement("discard")}}
- {{SVGElement("ellipse")}}
- {{SVGElement("foreignObject")}}
- {{SVGElement("g")}}
Expand Down
37 changes: 0 additions & 37 deletions files/en-us/web/svg/element/discard/index.md

This file was deleted.

3 changes: 1 addition & 2 deletions files/en-us/web/svg/element/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ SVG drawings and images are created using a wide array of elements which are ded

- {{SVGElement("defs")}}
- {{SVGElement("desc")}}
- {{SVGElement("discard")}}

### E

Expand Down Expand Up @@ -130,7 +129,7 @@ SVG drawings and images are created using a wide array of elements which are ded

### Animation elements

{{SVGElement("animate")}}, {{SVGElement("animateMotion")}}, {{SVGElement("animateTransform")}}, {{SVGElement("discard")}}, {{SVGElement("mpath")}}, {{SVGElement("set")}}
{{SVGElement("animate")}}, {{SVGElement("animateMotion")}}, {{SVGElement("animateTransform")}}, {{SVGElement("mpath")}}, {{SVGElement("set")}}

### Basic shapes

Expand Down
4 changes: 0 additions & 4 deletions files/jsondata/InterfaceData.json
Original file line number Diff line number Diff line change
Expand Up @@ -3052,10 +3052,6 @@
"inh": "SVGElement",
"impl": []
},
"SVGDiscardElement": {
"inh": "SVGAnimationElement",
"impl": []
},
"SVGElement": {
"inh": "Element",
"impl": []
Expand Down
13 changes: 0 additions & 13 deletions files/jsondata/SVGData.json
Original file line number Diff line number Diff line change
Expand Up @@ -297,19 +297,6 @@
"attributes": ["coreAttributes", "'class'", "'style'"],
"interfaces": ["SVGDescElement"]
},
"discard": {
"categories": ["animationElement"],
"content": {
"description": "anyNumberOfElementsAnyOrder",
"elements": ["descriptiveElements", "&lt;script&gt;"]
},
"attributes": [
"conditionalProcessingAttributes",
"coreAttributes",
"'begin'",
"'href'"
]
},
"ellipse": {
"categories": ["basicShapeElement", "graphicsElement", "shapeElement"],
"content": {
Expand Down

0 comments on commit 3cca389

Please sign in to comment.