.type()

  • function
FuncUnit.prototype.type

type(text [,success])

Types text into an element. This makes use of [syn.type] and works in a very similar way.

Quick Examples

//types hello world
F('#bar').type('helloworld')
//submits a form by typing \r
F("input[name=age]").type("27\r")
//types FuncUnit, then deletes the Unit
F('#foo').type("FuncUnit\b\b\b\b")
//types JavaScriptMVC, then removes the MVC
F('#zar').type("JavaScriptMVC[left][left][left]"+
 "[delete][delete][delete]")
//types JavaScriptMVC, then selects the MVC and
//deletes it
F('#zar').type("JavaScriptMVC[shift]"+
 "[left][left][left]"+
 "[shift-up][delete]")

Parameters

  1. text {String}

    the text you want to type

  2. success {function()}Optional

    a callback that is run after typing, but before the next action.

Returns

{FuncUnit}

returns the funcUnit object for chaining.

Characters

For a list of the characters you can type, check [syn.keycodes].

AltStyle によって変換されたページ (->オリジナル) /