Type alias PageLoadAgent

PageLoadAgent: ((this: void, next: ((this: void, request?: Request) => OnEvent<[PageLoadResponse]>), request: Request) => EventSender<[PageLoadResponse]>)

Type declaration

    • (this: void, next: ((this: void, request?: Request) => OnEvent<[PageLoadResponse]>), request: Request): EventSender<[PageLoadResponse]>
    • Page load agent signature.

      The agent can be used to alter loaded page document processing. For that it should be registered in appropriate context.

      All registered agents are organized into chain. The first agent in chain is called by page loader.

      Returns

      An EventSender of page load response. It is returned either to preceding agent in chain, or as a loaded document.

      Parameters

      • this: void
      • next: ((this: void, request?: Request) => OnEvent<[PageLoadResponse]>)

        Either calls the next agent in chain, or actually loads page document if this agent is the last one. Accepts an optional Request parameter. The original request will be used instead when omitted.

      • request: Request

        HTTP request.

      Returns EventSender<[PageLoadResponse]>

Generated using TypeDoc