⚠ This website is the beta version of the PCIbex documentation and is still under development. ⚠
Link Search Menu Expand Document

standard.before

Audio Button Canvas Controller DropDown Html Image MediaRecorder Scale Text TextInput TextInput Tooltip Video Youtube

syntax

getX(“ELEMENT_NAME”).before(getX(“ARGUMENT_NAME”))

What does getX() mean?

description

Takes an element as an argument, and adds that element’s content to the left of the element that the command is called on.

  • standard.after : Takes an element as an argument, and adds that element's content to the right of the element that the command is called on.

example


@// Option 1: Pass a new element as an argument
@newTrial("option-1",
@    newText("center", "BANANA")
$        .before(newText("left", "apple"))
@        .after(newText("right", "orange"))
@        .print()
@)
@
@// Option 2: Pass an existing element as an argument
@newTrial("option-2",
@    newText("left", "apple")
@    ,
@    newText("right", "orange")
@    ,
@    newText("center", "BANANA")
$        .before(getText("left"))
@        .after(getText("right"))
@        .print()
@)

↳ Prints appleBANANAorange to the screen.