gateway

Methods

abortablePromise(promise, abort) → {AbortPromise}static #

Parameters:

Name Type Attributes Description
promise Promise | jQuery.Promise.<T>
abort function optional
Source:

Returns:

Type
AbortPromise

getGatewayForPreviewType(type) → {Gateway|undefined}static #

Parameters:

Name Type Description
type string

Type of preview we are handling

Source:

Returns:

Type
Gateway | undefined

registerGatewayForPreviewType(type, gateway)static #

Register a gateway for a given preview type.

Parameters:

Name Type Description
type string

preview type

gateway Gateway
Source:

Type Definitions

AbortPromise #

A Promise, usually for a long running or costly task such as an HTTP request, that is abortable.

Type:

Properties:

Name Type Description
abort function
Source:

ConvertPageToModel() #

Converts the API response to a preview model. Exposed for testing only.

Source:

FetchPreviewForTitle() #

Fetches a preview for a page or reference.

If the underlying request is successful and contains data for the requested title, then the resulting promise will resolve. If not, then it will reject.

Source:

Gateway #

The interface implemented by all preview gateways.

Properties:

Name Type Description
fetch function
fetchPreviewForTitle FetchPreviewForTitle
convertPageToModel ConvertPageToModel
Source: