mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
27 lines
777 B
HTML
27 lines
777 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<body>
|
|
<script>
|
|
var im = navigator.mozInputMethod;
|
|
if (im) {
|
|
var intervalId = null;
|
|
// Automatically append location hash to current input field.
|
|
im.oninputcontextchange = function() {
|
|
var ctx = im.inputcontext;
|
|
if (ctx) {
|
|
dump('inputcontext is received for input method ' + location.hash + '\n');
|
|
intervalId = setInterval(function() {
|
|
dump('sending text in input method ' + location.hash + '\n');
|
|
ctx.replaceSurroundingText(location.hash);
|
|
}, 500);
|
|
} else {
|
|
dump('inputcontext is removed for input method ' + location.hash + '\n');
|
|
clearInterval(intervalId);
|
|
}
|
|
};
|
|
}
|
|
</script>
|
|
<p>This frame representing the input method frame.</p>
|
|
</body>
|
|
</html>
|