Browse SDK

plandalf.ready()

Run a callback when the SDK instance is ready.

Implemented by the browser object.

Signature

plandalf.ready(cb: (instance: Plandalf) => void): void

Arguments

NameTypeMeaning
cb(instance: Plandalf) => voidCallback invoked with the initialized class instance.

Example

ready.js
plandalf.ready(() => {
  console.log(plandalf.getAnonId())
})

Returns

void

Behaviour

Use this callback before calling methods that depend on initialization. It receives the raw Plandalf class instance, but ordinary browser code can keep using plandalf.

All plandalf methods

Feature detail