Browse SDK

plandalf.from()

Find the live handle associated with an element.

Implemented by the browser object; parameter and return types follow the interface declaration.

Signature

plandalf.from(el: Element): FlowHandle<unknown> | PromoHandle | null

Arguments

NameTypeMeaning
elElementElement associated with a declarative SDK handle.

Example

from.js
const button = document.querySelector('[data-plandalf-present]')
if (button) {
  const handle = plandalf.from(button)
  console.log(handle)
}

Returns

FlowHandle<unknown> | PromoHandle | null

Behaviour

The browser object reads its element-handle registry directly. The PlandalfSDK interface declares this return type, while the current class source lacks its from() implementation.

All plandalf methods

Feature detail