-
Notifications
You must be signed in to change notification settings - Fork 141
Refactor out value type-checking logic from CSSStyleValue.append to fix issue #145 #429
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
Conversation
css-typed-om/Overview.bs
Outdated
</div> | ||
|
||
<div algorithm> | ||
This section describes the <dfn>algorithm to check if any given |value| is of a certain type</dfn>: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...is of a type that applies to a given |property|, otherwise referencing property below makes no sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
7. Append |values to append| to the end of |entry|’s list. | ||
</div> | ||
|
||
<div algorithm> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
css-typed-om/Overview.bs
Outdated
|
||
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| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/exits/does not throw/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the changes you asked for, PTAL? Thanks!
css-typed-om/Overview.bs
Outdated
|
||
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| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
css-typed-om/Overview.bs
Outdated
</div> | ||
|
||
<div algorithm> | ||
This section describes the <dfn>algorithm to check if any given |value| is of a certain type</dfn>: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
7. Append |values to append| to the end of |entry|’s list. | ||
</div> | ||
|
||
<div algorithm> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
css-typed-om/Overview.bs
Outdated
</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}}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/por/or/
Fix for issue #145 - @shans could you PTAL?