Refactor out value type-checking logic from CSSStyleValue.append to fix issue #145#429
Merged
Conversation
shans
reviewed
Jul 25, 2017
| </div> | ||
|
|
||
| <div algorithm> | ||
| This section describes the <dfn>algorithm to check if any given |value| is of a certain type</dfn>: |
Contributor
There was a problem hiding this comment.
...is of a type that applies to a given |property|, otherwise referencing property below makes no sense.
| 7. Append |values to append| to the end of |entry|’s list. | ||
| </div> | ||
|
|
||
| <div algorithm> |
Contributor
There was a problem hiding this comment.
I think this algorithm coerces |value| into an appropriate type, as it attempts to convert DOMStrings. Also describe how it fails (i.e. by throwing a TypeError)
|
|
||
| 6. For each |value| in |values|: | ||
| 6. For each |value| in |values| if the [=algorithm to check if any given value is of a certain type=] described below exits | ||
| gracefully append the returned object to |values to append| |
nainar
commented
Jul 25, 2017
Contributor
Author
nainar
left a comment
There was a problem hiding this comment.
Made the changes you asked for, PTAL? Thanks!
|
|
||
| 6. For each |value| in |values|: | ||
| 6. For each |value| in |values| if the [=algorithm to check if any given value is of a certain type=] described below exits | ||
| gracefully append the returned object to |values to append| |
| </div> | ||
|
|
||
| <div algorithm> | ||
| This section describes the <dfn>algorithm to check if any given |value| is of a certain type</dfn>: |
| 7. Append |values to append| to the end of |entry|’s list. | ||
| </div> | ||
|
|
||
| <div algorithm> |
shans
approved these changes
Jul 25, 2017
| </div> | ||
|
|
||
| <div algorithm> | ||
| This section describes the <dfn>algorithm that coerces value into an appropriate type for a given property</dfn>, por fails and throws a {{TypeError}}: |
shans
approved these changes
Jul 25, 2017
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.
Fix for issue #145 - @shans could you PTAL?