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

Why can't Node's nodeValue use [TreatNullAs=EmptyString]? #259

Closed
domenic opened this issue May 31, 2016 · 2 comments
Closed

Why can't Node's nodeValue use [TreatNullAs=EmptyString]? #259

domenic opened this issue May 31, 2016 · 2 comments

Comments

@domenic
Copy link
Member

domenic commented May 31, 2016

https://dom.spec.whatwg.org/#interface-node

The nodeValue attribute must, on setting, if the new value is null, act as if it was the empty string instead, and then do as described below, depending on the context object:

Why is this in prose instead of in IDL? Attr uses IDL for this. If there is some subtle difference, documenting it in a note would be good.

/cc @DigiTec

@ArkadiuszMichalski
Copy link
Contributor

Because Node variants are nullable and: "This means that even an attribute of type DOMString? must not use [TreatNullAs], since null is a valid value of that type."
http://heycam.github.io/webidl/#TreatNullAs
#36 (comment)

@domenic
Copy link
Member Author

domenic commented Jun 1, 2016

Ah, OK, that makes sense. That seems like an arbitrary Web IDL restriction to me, but oh well. Thanks!

@domenic domenic closed this as completed Jun 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants