W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2010

Re: proposal: add input/keyboard locale to text and keyboard events [ISSUE-119]

From: Jacob Rossi <jrossi@microsoft.com>
Date: Tue, 14 Dec 2010 19:43:26 +0000
To: "schepers@w3.org" <schepers@w3.org>, "www-dom@w3.org" <www-dom@w3.org>, "olli.pettay@helsinki.fi" <olli.pettay@helsinki.fi>
Message-ID: <D0BC8E77E79D9846B61A2432D1BA4EAE02619348@TK5EX14MBXC116.redmond.corp.microsoft.com>
>> I think you mean null, not "" ;)
>>
>>
>> -Olli

So, I originally though it would be null. However, I had a discussion with shepazu about null versus "" for the .char property of KeyboardEvent.  The spec currently says,

                    "For a key which does not have a character representation, the value must be null."

But Doug claimed this was a mistake and it should actually be "". The explanation was that because .char is a DOMString, returning "" instead of null allows it to continue being a string. So taking the same logic, I made the conclusion that .inputLocale would also be "" when not determined.

If Doug is making the change for .char to be "" when not determined, then I think inputLocale should also be "".  Empty strings still fail an if-test, so I don't personally care if it's "" or null. But both properties should probably consistent in what they return when a proper value is not determinable.

-Jacob
Received on Tuesday, 14 December 2010 19:44:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:07 GMT