Module: gateway

Methods

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

Parameters:
Name Type Description
type string

Type of preview we are handling

Source:
Returns:
Type
Gateway | undefined

(static) registerGatewayForPreviewType(type, gateway)

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:
  • jQuery.Promise.<T>
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: