Class: JsxRosetta::IR::EventBinding
- Inherits:
-
Data
- Object
- Data
- JsxRosetta::IR::EventBinding
- Includes:
- Node
- Defined in:
- lib/jsx_rosetta/ir/types.rb
Overview
An event handler binding. Lowered from a JSX attribute named ‘on<Event>` whose value is an expression container.
event : String — lowercased DOM event name (“click”, “change”,
"mouseenter").
handler : Interpolation — the JS expression bound to the event,
verbatim. For ViewComponent + Stimulus, the caller is
expected to supply a Stimulus action descriptor string
(e.g. "click->my-controller#handleClick"); the component
just renders it through.
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#handler ⇒ Object
readonly
Returns the value of attribute handler.
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event
217 218 219 |
# File 'lib/jsx_rosetta/ir/types.rb', line 217 def event @event end |
#handler ⇒ Object (readonly)
Returns the value of attribute handler
217 218 219 |
# File 'lib/jsx_rosetta/ir/types.rb', line 217 def handler @handler end |