Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update info for svg <script> element #37529

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

skyclouds2001
Copy link
Contributor

Description

Motivation

Additional details

https://svgwg.org/svg2-draft/interact.html#ScriptElement for spec

Related issues and pull requests

@skyclouds2001 skyclouds2001 marked this pull request as ready for review January 6, 2025 16:54
@skyclouds2001 skyclouds2001 requested review from a team as code owners January 6, 2025 16:54
@skyclouds2001 skyclouds2001 requested review from chrisdavidmills and pepelsbey and removed request for a team January 6, 2025 16:54
@github-actions github-actions bot added Content:SVG SVG docs size/s [PR only] 6-50 LoC changed labels Jan 6, 2025
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Preview URLs

(comment last updated: 2025-01-07 17:18:10)

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skyclouds2001 I've included a couple of comments. I'm not an expert on SVG, so let's see if @pepelsbey has any thoughts too.

"'type'",
"'href'",
"'crossorigin'",
"'xlink:href'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec doesn't explicitly list this as an attribute option. Is this part of "xLinkAttributes", which I'm assuming represents deprecated xlink attributes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this should also be removed as it is represented in xLinkAttributes!

- {{SVGAttr("href")}}
- : The {{Glossary("URL")}} to the script to load.
_Value type_: **[\<URL>](/en-US/docs/Web/SVG/Content_type#url)** ; _Default value_: _none_; _Animatable_: **no**
- {{SVGAttr("type")}}
- : This attribute defines type of the script language to use.
_Value type_: [**\<string>**](/en-US/docs/Web/CSS/string); _Default value_: `application/ecmascript`; _Animatable_: **no**
_Value type_: [**`<media-type>`**](/en-US/docs/Glossary/MIME_type); _Default value_: `application/ecmascript`; _Animatable_: **no**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know MIME types are otherwise known as IANA media types, but I would suggest making the link text "MIME type", because "media type" is more commonly associated with media queries.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is suggested by @hamishwillee in #37288 (comment), and the MIME type glossary says it can be said as media type, which spec is also the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:SVG SVG docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants