dom/inputmethod/mochitest/file_inputmethod.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/inputmethod/mochitest/file_inputmethod.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,25 @@
     1.4 +<html>
     1.5 +<body>
     1.6 +<script>
     1.7 +  var im = navigator.mozInputMethod;
     1.8 +  if (im) {
     1.9 +    im.oninputcontextchange = onIcc;
    1.10 +
    1.11 +    if (im.inputcontext) {
    1.12 +      onIcc();
    1.13 +    }
    1.14 +  }
    1.15 +
    1.16 +  function onIcc() {
    1.17 +    var ctx = im.inputcontext;
    1.18 +    if (ctx) {
    1.19 +      ctx.replaceSurroundingText(location.hash).then(function() {
    1.20 +        /* Happy flow */
    1.21 +      }, function(err) {
    1.22 +        dump('ReplaceSurroundingText failed ' + err + '\n');
    1.23 +      });
    1.24 +    }
    1.25 +  }
    1.26 +</script>
    1.27 +</body>
    1.28 +</html>

mercurial