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

Allow xlink:href to get removed, fix option.value in mock #1979

Merged
merged 1 commit into from
Oct 1, 2017

Conversation

dead-claudia
Copy link
Member

Description

Motivation and Context

Just noticed while playing around with some optimization that xlink:* attributes were being mishandled, but I also noticed that option.value was incorrect in the mock, so I fixed it.

How Has This Been Tested?

Added some new tests and ran them all as usual.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated docs/change-log.md

@dead-claudia dead-claudia merged commit d00c34a into MithrilJS:next Oct 1, 2017
@dead-claudia dead-claudia deleted the fix-option-value branch October 1, 2017 23:43
Copy link
Contributor

@tivac tivac left a comment

Choose a reason for hiding this comment

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

I don't understand the null change, can you provide more detail @isiahmeadows?

@@ -376,15 +376,15 @@ o.spec("attributes", function() {

o(a.dom.value).equals("1")
})
o("null becomes the empty string", function() {
o("null becomes 'null'", function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this behavior desirable? I can't think of a time where you'd want to set "null" as an attribute value.

Copy link
Member Author

Choose a reason for hiding this comment

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

Just matching our behavior to the HTML and WebIDL specs. (Notably, the DOM's option.value does not have the [TreatNullAs=EmptyString] extended attribute.)

Copy link
Member Author

Choose a reason for hiding this comment

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

I filed #1978 (but closed it for reasons not related to this).

Copy link
Member Author

Choose a reason for hiding this comment

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

If you feel strongly enough about it, I can fix it pretty quickly.

(FYI, the mock still needed fixed, though.)

Copy link
Member

Choose a reason for hiding this comment

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

Actually this is in conflict with #1865 which I'm currently trying to rebase. I had set up on treating null and undefined in vdom indiscriminately as a lack of attribute, see fa53a66#diff-0c7e3694f9865906ffe0847957a6c3a9

I'll bring it up in gitter as well for visibility.

@@ -954,11 +954,11 @@ o.spec("domMock", function() {
o(select.selectedIndex).equals(1)
}
})
o("option.value = null is converted to the empty string", function() {
o("option.value = null is converted to 'null'", function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

See my previous question.

@dead-claudia
Copy link
Member Author

The xlink: handling itself needs backported, but not the behavioral attrs change. (I'm not sure how cleanly it could get merged, either way.)

dead-claudia pushed a commit to dead-claudia/mithril.js that referenced this pull request Oct 12, 2018
Allow `xlink:href` to get removed, fix `option.value` in mock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants