- From: Zoltan Kis via GitHub <sysbot+gh@w3.org>
- Date: Tue, 12 Nov 2019 08:37:58 +0000
- To: public-web-nfc@w3.org
What I question is why do we use nullable properties in WebIDL for `mediaType`, `encoding` and `lang`. Since they are used only with certain `recordType` values, they should be `undefined` in invalid cases, not just `null`. If the WebIDL was with non-nullable properties for `mediaType`, `encoding` and `lang`, then in the spec `undefined` should be used in algorithms instead of `null`, and in C++ the getter should throw. I wondered was `null` preferred because the way the bindings work, or implementation. Based on what you say looks like because of the bindings. Anyway, if `null` works for everyone, let's move on with that. And yes, I agree with Leon that algorithms don't need to have explicit statements for `null` initialization of nullable properties. But it adds to the clarity in this case, so we can keep them from my part. -- GitHub Notification of comment by zolkis Please view or discuss this issue at https://github.com/w3c/web-nfc/pull/441#issuecomment-552790670 using your GitHub account
Received on Tuesday, 12 November 2019 08:38:00 UTC