WebAPI/KeboardIME: Difference between revisions

Line 160: Line 160:
  interface <strike>InputMethodConnection</strike> InputContext: EventTarget {
  interface <strike>InputMethodConnection</strike> InputContext: EventTarget {
     // The tag name of input field, which is enum of "input", "textarea", or "contenteditable"
     // The tag name of input field, which is enum of "input", "textarea", or "contenteditable"
    // [JS] I think "type" would be better here.
    // [JS] This should also be 'readonly', right?
     DOMString name;
     DOMString name;
   
   
     // The type of the input field, which is enum of text, number, password, url, search, email, and so on.
     // The type of the input field, which is enum of text, number, password, url, search, email, and so on.
     // See http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#states-of-the-type-attribute
     // See http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#states-of-the-type-attribute
    // [JS] and "inputtype" here.
    // [JS] This should also be 'readonly', right?
     DOMString type;
     DOMString type;
   
   
Line 170: Line 174:
     * See http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#input-modalities:-the-inputmode-attribute
     * See http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#input-modalities:-the-inputmode-attribute
     */
     */
    // [JS] This should be 'readonly', right?
     DOMString inputmode;
     DOMString inputmode;
   
   
Line 177: Line 182:
     * See http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#htmlelement
     * See http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#htmlelement
     */
     */
    // [JS] This should be 'readonly', right?
     DOMString lang;
     DOMString lang;
   
   
Line 184: Line 190:
     Promise<DOMString> getText([optional] offset, [optional] length);
     Promise<DOMString> getText([optional] offset, [optional] length);
   
   
    // The start and stop position of the selection.
    // The start and stop position of the selection.
     readonly attribute long selectionStart;
    // [JS] Shouldn't this be an asynchronous function? I.e. something like
    readonly attribute long selectionEnd;
    //     Promise<...> getSelection();?
    readonly attribute long selectionStart;
    readonly attribute long selectionEnd;
   
   
     /*
     /*
Line 246: Line 254:
     *  }
     *  }
     */
     */
    // [JS] Can you describe how the cursor can be moved without the surrounding text
    //      also changing? Is that really something that can happen?
     attribute SurroundingTextChangeEventHandler onsurroundingtextchange;
     attribute SurroundingTextChangeEventHandler onsurroundingtextchange;
   
   
Confirmed users
716

edits