Skip to main content
Scramjet provides factory functions that load the appropriate APIs for different contexts. These functions are available globally after loading the Scramjet bundle.

$scramjetLoadController()

Factory function that creates the ScramjetController class for the window context.

Returns

An object containing the ScramjetController class.

Example

$scramjetLoadClient()

Factory function that creates the ScramjetClient class for controlling sandboxing.

Returns

An object containing the ScramjetClient class.

Example

Most users won’t need to interact with ScramjetClient directly. It’s automatically created when using ScramjetController and ScramjetFrame.

$scramjetLoadWorker()

Factory function that creates the ScramjetServiceWorker class for the service worker context.

Returns

An object containing the ScramjetServiceWorker class.

Example - Plain service worker

Example - Workbox routing

$scramjetVersion

Version information for the current Scramjet build.

Type

Example