vw_handler: Construct a vegawidget handler

View source: R/js-handler-internal.R

vw_handlerR Documentation

Construct a vegawidget handler

Description

You will likely call one of the specific handler-constructors: vw_handler_signal(), vw_handler_event(), in conjunction with vw_handler_add_effect().

Usage

vw_handler(args, body_value, body_effect)

Arguments

args

character, vector of names for the arguments for the handler

body_value

character, body of the value part of the handler

body_effect

character, body of the effect part of the handler

Details

The handler has three parts:

  • args arguments to the handler

  • body_value the body of a function of the args, returns a value

  • body_effect the body of a function of the value, x, performs a side-effect

Value

object with S3 class vw_handler

See Also

vw_handler_signal(), vw_handler_event(), vw_handler_add_effect()


vegawidget documentation built on May 29, 2024, 12:17 p.m.