Skip to main content

ensure_handler_slot

Function ensure_handler_slot 

Source
pub fn ensure_handler_slot(target: &Value, ty: &str)
Expand description

Install the event-handler attribute slot for on<type> on target if this is the first assignment (defineEventHandler’s wrapper). The callback is read from @@on<type> at dispatch time, so a reassignment keeps the slot’s position in the listener order.