The calculation of a value is meant to be separate from the
production of a side-effect. This way, the code for a side-effect
can be used for any type of handler.
You are supplying the body_effect
to an effect-handler. This
takes a single argument, x
, representing the
calculated value. Doing this allows us to chain side-effects together;
be careful not to modify x
in any of the code you provide.
To see what side-effects are available in this package's handler-library,
call vw_handler_add_effect()
without any arguments. You may notice that
some of the effects, like "element_text"
, require additional parameters,
in this case, selector
.
Those parameters with a default value of NULL
require you to supply
a value; those with sensible defaults are optional.
To provide the parameters, call
vw_handler_add_effect()
with named arguments corresponding to the
names of the parameters. See the examples for details.