Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 <html>
2 <body>
3 <script>
4 var im = navigator.mozInputMethod;
5 if (im) {
6 im.oninputcontextchange = onIcc;
8 if (im.inputcontext) {
9 onIcc();
10 }
11 }
13 function onIcc() {
14 var ctx = im.inputcontext;
15 if (ctx) {
16 ctx.replaceSurroundingText(location.hash).then(function() {
17 /* Happy flow */
18 }, function(err) {
19 dump('ReplaceSurroundingText failed ' + err + '\n');
20 });
21 }
22 }
23 </script>
24 </body>
25 </html>