Open
Conversation
8c62e75 to
543336c
Compare
annevk
reviewed
Aug 13, 2018
Member
annevk
left a comment
There was a problem hiding this comment.
I quite like the direction this is going in. We do end up with a few more lines, but it's much more clear what is going on.
| <hr> | ||
|
|
||
|
|
||
| To <dfn export id=concept-element-attributes-set-by-name>create an attribute by value</dfn> |
Member
There was a problem hiding this comment.
Maybe we should name this "create and append an attribute"? Or maybe I don't understand "by value".
The other thing I'm thinking is that it would be nice if https://dom.spec.whatwg.org/#concept-element-attributes-set-value could invoke this algorithm as well. That would require additional arguments for namespace/prefix, but seems doable.
| <a for=Node>node document</a>. | ||
|
|
||
| <li><a lt="append an attribute">Append</a> this <a>attribute</a> to | ||
| <a>element</a> |
Member
There was a problem hiding this comment.
You want <var>element</var> here and a dot.
| <ol> | ||
| <li><p>Create an <a>attribute</a> whose | ||
| <a for="Attr">local name</a> is <var>qualifiedName</var>, <a for=Attr>value</a> is | ||
| <var>value</var>, and <a for=Node>node document</a> is <a>context object</a>'s |
| <li>Return. | ||
| </ol> | ||
|
|
||
| To <dfn export id=concept-element-attributes-get-valid-by-name>get a valid attribute by name</dfn> |
Member
There was a problem hiding this comment.
"validate and get an attribute by name" perhaps?
| <li><p><a lt="remove an attribute by name">Remove an attribute</a> given <var>qualifiedName</var> and the | ||
| <a>context object</a>. | ||
|
|
||
| <li>Return false. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solves:
#657
whatwg/html#3779
As I understand it vars are not mutable and are instead copied, right? This mean I still have to copy from
"get an attribute by name"the code.Would there be a way to simplify this further perhaps? I could copy out the two common steps in the body of
"get an attribute by name"and"get valid an attribute by name"into another concept?Are there better names for the concept?
💥 Error: 500 Internal Server Error 💥
PR Preview failed to build. (Last tried on Jan 15, 2021, 7:33 AM UTC).
More
PR Preview relies on a number of web services to run. There seems to be an issue with the following one:
🚨 CSS Spec Preprocessor - CSS Spec Preprocessor is the web service used to build Bikeshed specs.
🔗 Related URL
If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.