Permalink
Browse files

Fix #881: Make NavigatorLanguage#language non-nullable

PR: #885
  • Loading branch information...
yuyokk authored and zcorpan committed Mar 15, 2016
1 parent e2bd61d commit d5ccd6595271916e8f947d9bf0412288a985f7ae
Showing with 1 addition and 1 deletion.
  1. +1 −1 source
2 source
@@ -88943,7 +88943,7 @@ interface <dfn>NavigatorID</dfn> {

<pre class="idl">[NoInterfaceObject, Exposed=(Window,Worker)]
interface <dfn>NavigatorLanguage</dfn> {
readonly attribute DOMString? <span data-x="dom-navigator-language">language</span>;
readonly attribute DOMString <span data-x="dom-navigator-language">language</span>;
readonly attribute DOMString[] <span data-x="dom-navigator-languages">languages</span>;
};</pre>

4 comments on commit d5ccd65

@domenic

This comment has been minimized.

Copy link
Member

domenic replied Mar 16, 2016

Nit for the future: NavigatorLanguage#language is not valid JavaScript, IDL, or anything else. navigator.language is more correct; "NavigatorLanguage's language attribute" is also OK although developers will probably be confused.

@mathiasbynens

This comment has been minimized.

Copy link
Member

mathiasbynens replied Mar 16, 2016

For those reading along, # is a commonly used shorthand for .prototype..

👍 to simplifying it (navigator.language) in cases like this, especially for the first line of commit messages.

@domenic

This comment has been minimized.

Copy link
Member

domenic replied Mar 16, 2016

Which, despite being weird non-standard syntax, doesn't even apply here since NavigatorLanguage doesn't have a prototype.

@zcorpan

This comment has been minimized.

Copy link
Member

zcorpan replied Mar 16, 2016

OK, I agree here navigator.language would be clear, but in some cases e.g. element.foo it's not clear if foo is part of Element or HTMLElement or SVGElement or Node etc. So I sort of like Foo#bar as an informal notation, if not "shorthand of Foo.prototype.bar" then maybe "bar IDL attribute of Foo". But if it grinds your gears I'm happy to avoid the #

Please sign in to comment.