WebAPI/KeboardIME: Difference between revisions

m
Line 20: Line 20:
     // If the user change input directly from one input to another, only one event will be dispatched.
     // If the user change input directly from one input to another, only one event will be dispatched.
     attribute Function oninputmethodstatechange;
     attribute Function oninputmethodstatechange;
     // Whether the user begins editing.
     // Whether the user begins editing.
     readonly attribute boolean inputStarted;  
     readonly attribute boolean inputStarted;  
     // User moves the cursor, changes the selection, or alters the composing text length
     // User moves the cursor, changes the selection, or alters the composing text length
     attribute Function onselectionchange;
     attribute Function onselectionchange;
     // Send a keyevent to the input field that is currently attached. It exists in the current interface
     // Send a keyevent to the input field that is currently attached. It exists in the current interface
     void sendKey(in long keyCode, in long charCode, in long modifiers);
     void sendKey(in long keyCode, in long charCode, in long modifiers);
     // Insert the given text at the cursor position. Replace the selected text if any and clear the composing text.
     // Insert the given text at the cursor position. Replace the selected text if any and clear the composing text.
     void commitText(in DOMString text);
     void commitText(in DOMString text);
     // Set the text value of the current input field.  
     // Set the text value of the current input field.  
     void setText(in DOMString text);
     void setText(in DOMString text);
Line 33: Line 38:
     // Get the text value of the current input field asynchronously.
     // Get the text value of the current input field asynchronously.
     void getText(in long start, in long end, in Function callback);
     void getText(in long start, in long end, in Function callback);
     // Length of the content
     // Length of the content
     readonly attribute long textLength;
     readonly attribute long textLength;
     // Delete text around the cursor
     // Delete text around the cursor
     void deleteSurroundingText(in long beforeLength, in long afterLength);
     void deleteSurroundingText(in long beforeLength, in long afterLength);
     // Set the composing text before the current cursor position.
     // Set the composing text before the current cursor position.
     // To clear the composing text, set the text paramter to the empty string.
     // To clear the composing text, set the text paramter to the empty string.
     void setComposingText(in DOMString text);
     void setComposingText(in DOMString text);
     // The start and stop position of the selection.  
     // The start and stop position of the selection.  
     readonly attribute long selectionStart;
     readonly attribute long selectionStart;
     readonly attribute long selectionEnd;
     readonly attribute long selectionEnd;
     // Set the selection range of the the editable text.
     // Set the selection range of the the editable text.
     // Note that the start position should be less or equal to the end position.
     // Note that the start position should be less or equal to the end position.
     // To move the cursor, set the start and end position to the same value.
     // To move the cursor, set the start and end position to the same value.
     void setSelectionRange(in long start, in long end);
     void setSelectionRange(in long start, in long end);
     // Clear the focus of the current input field and hide the keyboard.
     // Clear the focus of the current input field and hide the keyboard.
     void removeFocus();
     void removeFocus();
     // Focus the next text field.
     // Focus the next text field.
     void advanceFocus();
     void advanceFocus();
     // Focus the previous text field.
     // Focus the previous text field.
     void rewindFocus();
     void rewindFocus();
     // This read only attribute is true if user can advance the focus to the next
     // This read only attribute is true if user can advance the focus to the next
     // text field.
     // text field.
     readonly attribute boolean canAdvanceFocus;
     readonly attribute boolean canAdvanceFocus;
     // This readonly attribute is true if user can rewind the focus back to the
     // This readonly attribute is true if user can rewind the focus back to the
     // previous text field.
     // previous text field.
     readonly attribute boolean canRewindFocus;
     readonly attribute boolean canRewindFocus;
     // The input mode string.
     // The input mode string.
     // https://bugzilla.mozilla.org/show_bug.cgi?id=796544
     // https://bugzilla.mozilla.org/show_bug.cgi?id=796544
Line 68: Line 84:
     // "latin-name" - word suggestions and capitalize each word
     // "latin-name" - word suggestions and capitalize each word
     readonly attribute DOMString inputMode;
     readonly attribute DOMString inputMode;
     // The type of the input field, including text, number, password, url, tel and email.
     // The type of the input field, including text, number, password, url, tel and email.
     readonly attribute DOMString inputType;
     readonly attribute DOMString inputType;
     // Get the return key type, which determines the title of the key displayed in the keyboard and action performed when it is  pressed. The value could be "done", "next", "go", "search" and "send".
     // Get the return key type, which determines the title of the key displayed in the keyboard and action performed when it is  pressed. The value could be "done", "next", "go", "search" and "send".
     // If the value is "next", when pressing the enter key, the focus should be move to the next input field.
     // If the value is "next", when pressing the enter key, the focus should be move to the next input field.
     readonly attribute DOMString returnKeyType;
     readonly attribute DOMString returnKeyType;
     // Get the customized label for the return key.
     // Get the customized label for the return key.
     readonly attribute DOMString returnKeyLabel;
     readonly attribute DOMString returnKeyLabel;
Confirmed users
58

edits