[Read-only GitHub mirror] docs.pvzm.net
docs engine reference menus.js getdall.md
695 B · 36 lines
Markdown
at main


icon: function #

getDAll #

Returns the #dAll container, waiting for it if needed.

Signature #

getDAll({ timeoutMs = 5000 } = {}) => Promise<HTMLElement>

Parameters #

  • timeoutMs
    Max wait time for #dAll.
    Default is 5000.

Behavior #

  • Returns immediately if #dAll already exists.
  • Waits for DOMContentLoaded if the DOM is still loading.
  • Observes DOM mutations for late insertion of #dAll.

Errors #

Rejects if #dAll never appears within timeoutMs. The thrown error message mentions LoadMenu.

Example #

const dAll = await getDAll({ timeoutMs: 10_000 });
dAll.appendChild(document.createTextNode("ready"));