Confirmed users
58
edits
(Does not need settings permission for a general 3rd-party keyboard app) |
m (Remove striked lines.) |
||
Line 347: | Line 347: | ||
* selectionStart and selectionEnd. | * selectionStart and selectionEnd. | ||
*/ | */ | ||
Promise<void> setSelectionRange(long start, long length); | Promise<void> setSelectionRange(long start, long length); | ||
Line 362: | Line 361: | ||
* @param length The length of text to replace. Defaults to 0. | * @param length The length of text to replace. Defaults to 0. | ||
*/ | */ | ||
Promise<void> replaceSurroundingText(DOMString text, optional long offset, optional long length); | Promise<void> replaceSurroundingText(DOMString text, optional long offset, optional long length); | ||
Line 371: | Line 369: | ||
* @param length The length of text to delete. | * @param length The length of text to delete. | ||
*/ | */ | ||
Promise<void> deleteSurroundingText(long offset, long length); | Promise<void> deleteSurroundingText(long offset, long length); | ||
Line 390: | Line 387: | ||
* Alternative: sendKey(KeyboardEvent event), but we will likely waste memory for creating the KeyboardEvent object. | * Alternative: sendKey(KeyboardEvent event), but we will likely waste memory for creating the KeyboardEvent object. | ||
*/ | */ | ||
Promise<void> sendKey(long keyCode, long charCode, optional long modifiers); | Promise<void> sendKey(long keyCode, long charCode, optional long modifiers); | ||
Line 413: | Line 409: | ||
* To finish composition and commit text to current input field, an IME should call |endComposition|. | * To finish composition and commit text to current input field, an IME should call |endComposition|. | ||
*/ | */ | ||
Promise<void> setComposition(DOMString text, optional long cursor); | Promise<void> setComposition(DOMString text, optional long cursor); | ||
Line 426: | Line 421: | ||
* |replaceSurroundingText|, |deleteSurroundingText|, user moving the cursor, changing the focus, etc. | * |replaceSurroundingText|, |deleteSurroundingText|, user moving the cursor, changing the focus, etc. | ||
*/ | */ | ||
Promise<void> endComposition(optional DOMString text); | |||
}; | }; | ||