Function deserializeEventAttribute

  • Deserializes an attribute with an event on/once prefix. The attribute will decide which event listener to add to the instance post-initialization. The listeners will be added to the instantiation context for later use.

    Parameters

    • once: boolean

      Should once be set to true in Widget#on?

    • parser: BaseXMLUIParser

      The parser that is calling this deserializer

    • context: XMLUIParserContext

      The current parser context, shared with all other initializations

    • instantiationContext: Record<string, unknown>

      The current parser context, only available to this instantiation

    • attribute: Attr

      The attribute to deserialize - the attribute name decides the event type to listen to

    Returns void