element.once()
Like on(), for the next event only.
once<K extends keyof ElementEvents>(event: K, handler: (e: ElementEvents[K]) => void): void;Parameters
Section titled “Parameters”eventkeyof ElementEventsRequiredThe event name.
handler(e: ElementEvents[K]) => voidRequiredCalled once with the event payload.
Example
Section titled “Example”guide.once("ready", () => performance.mark("tys-ready"));Was this page helpful?
Thank you. We read every answer.