Search


Search something to see results

ResponseHandlerContext

Context with gives the DynamicResponseHandlers access to critical information.

interface ResponseHandlerContext {
    canDisplayErrorPage: boolean;
    deactivateSpeedKit: (disconnectCause?: DisconnectCause) => void;
    defaultBlacklistHandler: DynamicResponseHandler;
    defaultClientErrorHandler: DynamicResponseHandler;
    defaultCorsRedirectHandler: DynamicResponseHandler;
    defaultNotFoundHandler: DynamicResponseHandler;
    defaultOfflineHandler: DynamicResponseHandler;
    defaultRedirectHandler: DynamicResponseHandler;
    defaultServerErrorHandler: DynamicResponseHandler;
    domDelayActive: boolean;
    dynamicBlockResponse: Document;
    ensureScriptValidity: (remoteDocument: Document) => void;
    exchangeDocument: (doc: Document) => void;
    reloadFromOrigin: () => void;
    trackChanges: (
        changes: ContentChange | ContentChange[] | DetectedChanges,
    ) => void;
    xhr: XMLHttpRequest;
}

Index

Properties

Properties

canDisplayErrorPage: boolean

Toggles the error page, set in config.

deactivateSpeedKit: (disconnectCause?: DisconnectCause) => void

Locally deactivates Speed Kit.

defaultBlacklistHandler: DynamicResponseHandler
defaultClientErrorHandler: DynamicResponseHandler
defaultCorsRedirectHandler: DynamicResponseHandler
defaultNotFoundHandler: DynamicResponseHandler
defaultOfflineHandler: DynamicResponseHandler
defaultRedirectHandler: DynamicResponseHandler
defaultServerErrorHandler: DynamicResponseHandler
domDelayActive: boolean

Whether DOM delay is activated.

dynamicBlockResponse: Document

The Dynamic Block response.

ensureScriptValidity: (remoteDocument: Document) => void

Checks whether the scripts in documents are compatible and reloads the site otherwise.

exchangeDocument: (doc: Document) => void

Exchange the current document with the remote response to show error site.

reloadFromOrigin: () => void

Reloads the current page from origin.

trackChanges: (
    changes: ContentChange | ContentChange[] | DetectedChanges,
) => void

Tracks changes detected during the merge. Depending on the input it either tracks the changes under the legacy block-based change detection key ("changeDetection") or the new content change detection key ("contentChangeDetection").

The state of the XMLHttpRequest.