Reference · Cube engine and views
mountMoveListfunction
A list of moves drawn in an element.
Import it
import { mountMoveList } from "@johnmorrisdotca/kyuubu";
Definition
function mountMoveList(host: HTMLElement, options: MoveListOptions): MoveListHandle
Parameters
| Name | Type | Description |
|---|---|---|
host | HTMLElement | The DOM element that receives the view and controls. |
options | MoveListOptions | Options for this call; omitted fields retain their documented defaults. |
Returns
MoveListHandle
A list of moves drawn in an element.
Examples
import { mountMoveList } from "@johnmorrisdotca/kyuubu";
const host = document.createElement("div");
document.body.append(host);
const list = mountMoveList(host, { groups: [{ label: "Solve", items: ["R", "R'"] }], current: 0 });
console.log(list.element.tagName);
// Call list.destroy() when removing the list.