Strophe.js
    Preparing search index...

    Interface StreamParserHandlers

    interface StreamParserHandlers {
        onError: (error: Error) => void;
        onStanza: (stanza: Element) => void;
        onStreamEnd: () => void;
        onStreamStart: (attrs: Record<string, string>) => void;
    }
    Index
    onError: (error: Error) => void

    Called on any XML parse error. The stream should be considered dead.

    onStanza: (stanza: Element) => void

    Called with each complete top-level stanza as a DOM Element.

    onStreamEnd: () => void

    Called when the closing </stream:stream> tag is received.

    onStreamStart: (attrs: Record<string, string>) => void

    Called once the opening <stream:stream …> header is seen, with its attributes (most importantly id). The header never closes until the stream ends, so this fires as soon as its start tag is complete.