getInputBinding: Obtain registered input bindings

Description Usage Arguments Value Examples

View source: R/shiny-inputbindings.R

Description

Obtain registered input bindings

Usage

1
getInputBinding(fname, pkg = NULL, envir = parent.frame())

Arguments

fname

input function name, character or quoted expression such as 'shiny::textInput' or numericInput.

pkg

(optional), name of package

envir

environment to evaluate fname if pkg is not provided

Value

a list containing: 1. 'JavaScript' input binding name; 2. 'R' updating function name

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library(dipsaus)

# Most recommended usage
getInputBinding('compoundInput2', pkg = 'dipsaus')

# Other usages
getInputBinding('shiny::textInput')


getInputBinding(shiny::textInput)

getInputBinding(compoundInput2, pkg = 'dipsaus')

# Bad usage, raise errors in some cases
## Not run: 
## You need to library(shiny), or set envir=asNamespace('shiny'), or pkg='shiny'
getInputBinding('textInput')
getInputBinding(textInput) # also fails

## Always fails
getInputBinding('dipsaus::compoundInput2', pkg = 'dipsaus')

## End(Not run)

dipsaus documentation built on Sept. 6, 2021, 5:08 p.m.