Global

Members

(constant) serviceWorkerMessageSignal :qui.base.Signal

Emitted whenever a message is received from the controlling service worker. Handlers are called with the following parameters:

  • serviceWorker, the new controlling service worker
  • message, the incoming message
Type:
Source:

whenServiceWorkerReady :qui.base.ConditionVariable

A condition that is fulfilled as soon as this client becomes controlled by a service worker. The condition is passed the service worker as parameter.

Type:
Source:

Methods

cleanup()

Cleanup workarounds set up for providing define()/require() compatibility.

Source:

getHTML() → {jQuery}

Return the menu bar HTML element.

Source:
Returns:
Type
jQuery

getHTML() → {jQuery}

Return the top bar HTML element.

Source:
Returns:
Type
jQuery

getServiceWorker() → (nullable) {ServiceWorker}

Return the service worker that currently controls the client.

Source:
Returns:
Type
ServiceWorker

isClass(c) → {Boolean}

Tell if argument is a class.

Parameters:
Name Type Description
c *
Source:
Returns:
Type
Boolean

isFunction(f) → {Boolean}

Tell if argument is a function and not a class.

Parameters:
Name Type Description
f *
Source:
Returns:
Type
Boolean

isObject(value) → {Boolean}

Tell if a value is a pure object.

Parameters:
Name Type Description
value *

value to test

Source:
Returns:
Type
Boolean

isServiceWorkerSupported() → {Boolean}

Tell if service workers are supported.

Source:
Returns:
Type
Boolean

makeToken(chars, length) → {String}

Generate a random token of a given length from a specified set of characters.

Parameters:
Name Type Description
chars String

allowed characters (e.g. "a-zA-Z0-9").

length Number

desired token length

Source:
Returns:

the generated token

Type
String

Navigate to initial browser path. Call this function after all sections have been registered.

Source:
Returns:

a promise that settles as soon as the navigation ends, being rejected in case of any error

Type
Promise

reset() → {Promise}

Reset all sections.

Source:
Returns:

a promise that is settled as soon as all sections have been reset

Type
Promise

sendServiceWorkerMessage(message)

Send a message to the controlling service worker.

Parameters:
Name Type Description
message *

the message to send

Source: