Skip to main content

new_emitter_object

Function new_emitter_object 

Source
pub fn new_emitter_object(tag: &str, extra: IndexMap<String, Value>) -> Value
Expand description

Build a native emitter object (@@native tag + @@on/@@once listener maps) carrying the given extra props. Shared shape with events::new_emitter so the EventEmitter methods (on/once/emit/…) work verbatim.