-
Notifications
You must be signed in to change notification settings - Fork 223
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
Creating attribute not recognized by local_name!() #369
Comments
If an attribute name is mentioned in the HTML spec, it should probably be added to the set of statically-known strings for
|
Should the statically-known strings include non-HTML attribute names? For librsvg I need the let attr: QualName = ...;
match attr.expanded() {
expanded_name!("", "href") => ...,
expanded_name!("", encoding") => ...,
ref v if *v == ExpandedName { ns: &ns!(), local: &LocalName::from("parse") } => ...,
} I can submit a PR for those missing names if they are in markup5ever's scope. |
I'm inclined to say no, but I'll defer to @SimonSapin here. |
I think any name that can commonly appear in a DOM attribute name or element name on web content should be fine to add, especially if it’s defined in a W3C or WHATWG spec. In this specific case, Servo will likely want to implement SVG eventually. |
"download", "translate", "spellcheck", and "reversed" are other HTML content attributes missing from the list. |
Add local names mentioned in #369 Most of these are for HTML elements; "parse" is for xinclude, which at least one SVG library uses as explained in #369 (comment)
I've also found |
PRs to add additional items are accepted. Keep in mind that you can use LocalName::from_str in the meantime. |
html5ever v0.22.5 is unaware of the
decoding
attribute: https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-decodingQualName::new(None, ns!(), local_name!("decoding"))
doesn't recognize the name. Is there another way to create the attribute?The text was updated successfully, but these errors were encountered: