{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/uievents/issues/48","labels_url":"https://api.github.com/repos/w3c/uievents/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/w3c/uievents/issues/48/comments","events_url":"https://api.github.com/repos/w3c/uievents/issues/48/events","html_url":"https://github.com/w3c/uievents/issues/48","id":110151379,"number":48,"title":"Is CompositionEvent supposed to have .locale?","user":{"login":"garykac","id":1480010,"avatar_url":"https://avatars.githubusercontent.com/u/1480010?v=3","gravatar_id":"","url":"https://api.github.com/users/garykac","html_url":"https://github.com/garykac","followers_url":"https://api.github.com/users/garykac/followers","following_url":"https://api.github.com/users/garykac/following{/other_user}","gists_url":"https://api.github.com/users/garykac/gists{/gist_id}","starred_url":"https://api.github.com/users/garykac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garykac/subscriptions","organizations_url":"https://api.github.com/users/garykac/orgs","repos_url":"https://api.github.com/users/garykac/repos","events_url":"https://api.github.com/users/garykac/events{/privacy}","received_events_url":"https://api.github.com/users/garykac/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/w3c/uievents/labels/Composition%20and%20Editing","name":"Composition and Editing","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-07T04:46:35Z","updated_at":"2015-10-28T00:13:20Z","closed_at":null,"body":"Copied from W3C Bugzilla: https://www.w3.org/Bugs/Public/show_bug.cgi?id=28924\r\n\r\n##### Olli Pettay 2015-07-07 17:24:39 UTC\r\nIt is not clear how CompositionEvent should behave per current draft.\r\nShould it have .locale property which is then initialized for example using\r\nthe legacy initCompositionEvent?\r\nAnd should the dictionary for ctor have locale too?\r\n\r\nSome version of some spec (I'm getting lost with D3E, UIEvents and UIEventsExtensions) had .locale in KeyboardEvent.\r\n\r\nAnyhow, since .locale is there for initCompositionEvent, I'll add it to the dictionary too in Gecko. Guess work here.\r\n\r\n##### Comment 1 Olli Pettay 2015-07-07 17:27:53 UTC\r\nOh, CompositionEvent used to have readonly attribute DOMString? data, but now it is non-nullable. Why the backwards incompatible change?\r\n\r\n##### Comment 2 Takayoshi Kochi 2015-07-08 08:14:06 UTC\r\nI'm not following the D3E discussion lately, but ~2years ago when I\r\ninvestigated this, only IE was implementing the .locale on Composition events.\r\nIt was hard to formulate the proper value for .locale, and I gave up\r\nincluding it in IME API.\r\n\r\nI'm not sure how popular the usage is, but I guess we should avoid\r\nabandon .locale in the spec as it is poorly spec'ed and quite hard\r\nor sometimes meanless to expose the value on some environment.\r\n\r\nNote: You may wonder why .locale is filled for each event, even though\r\n.locale should rarely change between events.  I heard that the rationale\r\nwas for not leaking user's environment without user's consent - typing on\r\nkeyboard is considered an affirmative action that user let the user agent\r\n(or the author of the content) know in which locale he/she is typing text.\r\n\r\nNote2: the intention to include .locale in IME API was not only to\r\nexpose user's typing environment, but to *change* the locale so that\r\nan author can *force* which language is expected to type in for\r\nsome form element etc. (i.e., .locale is writable). It might sound\r\nuseful, but quite hard to implement interoperably."},"comment":{"url":"https://api.github.com/repos/w3c/uievents/issues/comments/151681008","html_url":"https://github.com/w3c/uievents/issues/48#issuecomment-151681008","issue_url":"https://api.github.com/repos/w3c/uievents/issues/48","id":151681008,"user":{"login":"masayuki-nakano","id":8064604,"avatar_url":"https://avatars.githubusercontent.com/u/8064604?v=3","gravatar_id":"","url":"https://api.github.com/users/masayuki-nakano","html_url":"https://github.com/masayuki-nakano","followers_url":"https://api.github.com/users/masayuki-nakano/followers","following_url":"https://api.github.com/users/masayuki-nakano/following{/other_user}","gists_url":"https://api.github.com/users/masayuki-nakano/gists{/gist_id}","starred_url":"https://api.github.com/users/masayuki-nakano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masayuki-nakano/subscriptions","organizations_url":"https://api.github.com/users/masayuki-nakano/orgs","repos_url":"https://api.github.com/users/masayuki-nakano/repos","events_url":"https://api.github.com/users/masayuki-nakano/events{/privacy}","received_events_url":"https://api.github.com/users/masayuki-nakano/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T00:13:20Z","updated_at":"2015-10-28T00:13:20Z","body":"The .locale value should be gone unless somebody suggests a good way to be able to set same value between browsers on different platforms for same keyboard layout or IME.\r\n\r\nI think that if browsers having CompositionEvent.locale (even not working with native keyboard layout nor IME), its constructor should have an entry to initialize the attribute.\r\n\r\nAnd I think that CompositionEvent.data shouldn't be nullable. In such case, the value should be empty string."}}