plandalf.ready()
Run a callback when the SDK instance is ready.
Implemented by the browser object.
Workspace snapshot: the inspected SDK has local changes. Source links identify its base commit and may differ from this working copy. Verify the SDK build you deploy before relying on unreleased behavior.
Signature
plandalf.ready(cb: (instance: Plandalf) => void): voidArguments
| Name | Type | Meaning |
|---|---|---|
cb | (instance: Plandalf) => void | Callback 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.