Search


Search something to see results

ResponseHandlerContext

Context with gives the DynamicResponseHandlers access to critical information.

interface ResponseHandlerContext {
    canDisplayErrorPage: boolean;
    deactivateSpeedKit: (disconnectCause?: DisconnectCause) => void;
    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;
    showOfflineBanner: () => void;
    trackChanges: (changes: DetectedChanges) => void;
    xhr: XMLHttpRequest;
}

Index

Properties

Properties

canDisplayErrorPage: boolean

Toggles the error page, set in config.

deactivateSpeedKit: (disconnectCause?: DisconnectCause) => void

Locally deactivates Speed Kit.

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.

showOfflineBanner: () => void

Displays the offline banner set in the config.

trackChanges: (changes: DetectedChanges) => void

Tracks changes in a DynamicBlockElement.

The state of the XMLHttpRequest.