In ESR52, I confirmed in the code and by manual observation that this functionality is not exposed in content. The getCalendarInfo function can be used from chrome code like this:
This API remains chrome-only. I think there's no intention to expose it to content. So I would suggest closing this ticket.
Ugh, that took me quite some time... What do you mean with "chrome-only"? It seems content might be able to get a user to trigger the API via the <input> element, no? See https://blog.nightly.mozilla.org/2017/06/12/datetime-inputs-enabled-on-nightly/ for some examples: there is definitely a localization component that is exposed to content. Not sure if JS can made to access that directly but I bet that at least the resulting rendering differences might give a hint about a possible used locale. This is "no issue" for the Tor Browser alpha but only as our content policy hack breaks this feature. We are about to remove it, though.
}}}
There is no need to indent that piece of the code. I tested the patch on a Linux box. Waiting on a second review either by mcs/brade or by pospeselr.
At first I was worried that some occurrences of mSpoofEnglish were missing this. in front of them, but I think the global JS object is this in those places so the code is OK.
At first I was worried that some occurrences of mSpoofEnglish were missing this. in front of them, but I think the global JS object is this in those places so the code is OK.
Thanks, good catch. I think it's better to make the this explicit. So I made a new version that uses this.mSpoofEnglish everywhere: