Lattice Grid Buy a licence

AI ยท console.warn

attachExplain() needs a document to build a button.

Printed by AI, prefixed [lattice], since 1.42.0.

Warnings referenceai:explain:no-doc

Identifier
ai:explain:no-doc
Raised by
AI
Since
1.42.0

What happened

attachExplain() builds a button element, and there is no document to build it in - neither the mount option nor config.element resolves to one. null is returned and no button exists.

The fix

Pass mount (or set config.element) so the module can find the document. This call has no meaning in a headless environment.

The smallest fix

ai.attachExplain(target, { mount: el });

Reference

Covered in full at the API reference.