Reference · Tile and table elements
JarajaraLayoutclass
A GAME OF AWASE ON ANY PAGE: <jarajara-layout size="15">, a stacked layout of tiles drawn on a cloth, with the
rules of the solitaire in it: tap a free tile, then its match, and the pair goes. The free tiles can be lit, the tiles
that match the one chosen ringed, a hint asked for, the tiles shuffled when no pair is left, and a move undone. The
same layout can be looked at lined up instead, sorted by where each slot is.
<jarajara-layout size="15" level="medium" show-free controls timer cloth="green"></jarajara-layout>Attributes, all optional:
size the layout's width in tiles, which names it: 15 (the Turtle, unless said), 4, 8, 9, 10 and the rest of MAHJONG_LAYOUTS
level easy, medium (unless said) or hard: how forgiving the deal is
seed the deal's seed: the same seed deals the same tiles (a fresh one unless said)
cells tiles of your own to play from, one letter a slot, . for a slot left empty, instead of a deal
show-free washes the blocked tiles darker so the free ones stand out
show-matching rings the tiles that match the one chosen
hints how many hints a game may use: a number, off, or unlimited (unless said)
shuffles how many shuffles a game may use, the same way
undo off takes undo away
challenge gold, spark, rush, fortune, sand, purge or blackout: the deal played for something else (AWASE_CHALLENGES); the clocks and goals are worked out from the layout
timer shows the game's clock: the time left in a challenge that has a clock, otherwise the time taken, from the first pair taken until the layout is clear
controls draws New deal, Undo, Hint and Shuffle buttons and the line that says how the game stands
view stack (unless said) draws the layout; lined draws its tiles lined up in a row, in the order sort gives, each with where it lies
sort how lined puts the slots in order: the keys x, y and z, - before one for the other way round: "z y x" (unless said), "x", "-z x"
find pointing at a tile (a mouse) or choosing one lights every tile that matches it: a free match (one to take with it now) in a solid ring, a held one in a dashed ring
mirror the view: none (unless said), horizontal, vertical or both: the board seen from the other side. A view only: the rules, hints and saved games keep the layout's own sides
flippable with controls, a Flip button that turns the view through the four
box keeps the board in one steady box whatever the layout: a ratio as 3/2, or landscape, portrait, square; the layout is scaled to fit it
static the tiles may be looked at but not played
sound a tile chosen, a pair taken, a shuffle and a cleared layout make their sounds
design, red-fives, lang, cloth as on the other elements
Methods: newDeal(seed?), take(a, b), hint(), shuffle(), undo(), restore(moves), sortBy(keys). Properties: seed, cells,
moves (as encodeMoves writes them), tilesLeft, score and run, the game as an AwaseRun. Events, all bubbling: jarajara-take ({ pair, codes, tilesLeft }),
jarajara-shuffle, jarajara-stuck, jarajara-clear ({ moves, seconds, score }, a game won), jarajara-lost ({ because }: time or stuck), jarajara-hint, jarajara-undo and jarajara-deal
({ size, level, seed }, a deal made, which a page that keeps the game listens for).
Import it
import { JarajaraLayout } from "@johnmorrisdotca/jarajara/element";
Definition
class JarajaraLayout
new JarajaraLayout(): JarajaraLayout
Members
| Name | Type | Description |
|---|---|---|
seed | number | The seed of the deal being played. Setting it sets the |
cells | string | The tiles as they lie, one letter a slot, |
moves | string | The moves played so far, written as |
tilesLeft | number | How many tiles are still on the layout. |
score | number | The points scored so far: a pair is worth its layer, and quick pairs in a row are worth more. |
run | AwaseRun | null | The game as the rules hold it ( |
newDeal | (seed?: number): void | Deal again, from |
restore | (moves: string): boolean | Play a game written as text ( |
take | (a: number, b: number): boolean | Take a pair, as a player's two taps do. Answers whether the pair could be taken: two free tiles that match, in a game that is not over. |
hint | (): [number, number] | null | Light the pair a hint names, if hints are left and a pair can be taken. With a tile chosen it looks for that tile's match first and lights it, leaving the chosen tile as it is; if that tile has no free match it says so and shows another pair. Answers the pair (the chosen tile first, for its match). |
shuffle | (): boolean | Shuffle the tiles that are left, which is for when no pair can be taken. Answers whether it was done. |
undo | (): boolean | Take the last move back. Answers whether there was one to take back, and the rules allow it. |
sortBy | (keys: string): void | Put the lined-up view in the order the keys give ( |
mirror | "none" | "horizontal" | "vertical" | "both" | The view now: |
flipView | (): TileMirror | Turn the board to the next view (none, left to right, top to bottom, both), as the Flip button does. Only the picture changes. |
connectedCallback | (): void | |
disconnectedCallback | (): void | |
attributeChangedCallback | (name: string, before: string | null, after: string | null): void | |
accessKey | string | The |
accessKeyLabel | string | The |
autocapitalize | string | The |
autocorrect | boolean | The |
dir | string | The |
draggable | boolean | The |
hidden | boolean | The HTMLElement property |
inert | boolean | The HTMLElement property |
innerText | string | The |
lang | string | The |
offsetHeight | number | The |
offsetLeft | number | The |
offsetParent | Element | null | The |
offsetTop | number | The |
offsetWidth | number | The |
outerText | string | The |
popover | string | null | The |
spellcheck | boolean | The |
title | string | The |
translate | boolean | The |
writingSuggestions | string | The |
attachInternals | (): ElementInternals | The |
click | (): void | The |
hidePopover | (): void | The |
showPopover | (): void | The |
togglePopover | (options?: boolean): boolean | The |
addEventListener | <K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void | The |
removeEventListener | <K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void | The |
attributes | NamedNodeMap | The |
classList | DOMTokenList | The |
className | string | The |
clientHeight | number | The |
clientLeft | number | The |
clientTop | number | The |
clientWidth | number | The |
currentCSSZoom | number | The |
id | string | The |
innerHTML | string | The |
localName | string | The |
namespaceURI | string | null | The |
onfullscreenchange | ((this: Element, ev: Event) => any) | null | |
onfullscreenerror | ((this: Element, ev: Event) => any) | null | |
outerHTML | string | The |
ownerDocument | Document | The read-only |
part | DOMTokenList | The |
prefix | string | null | The |
scrollHeight | number | The |
scrollLeft | number | The |
scrollTop | number | The |
scrollWidth | number | The |
shadowRoot | ShadowRoot | null | The |
slot | string | The |
tagName | string | The |
attachShadow | (init: ShadowRootInit): ShadowRoot | The |
checkVisibility | (options?: CheckVisibilityOptions): boolean | The |
closest | <K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null
<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null
<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null
<E extends Element = Element>(selectors: string): E | null | The |
computedStyleMap | (): StylePropertyMapReadOnly | The |
getAttribute | (qualifiedName: string): string | null | The |
getAttributeNS | (namespace: string | null, localName: string): string | null | The |
getAttributeNames | (): string[] | The |
getAttributeNode | (qualifiedName: string): Attr | null | Returns the specified attribute of the specified element, as an Attr node. |
getAttributeNodeNS | (namespace: string | null, localName: string): Attr | null | The |
getBoundingClientRect | (): DOMRect | The |
getClientRects | (): DOMRectList | The |
getElementsByClassName | (classNames: string): HTMLCollectionOf<Element> | The Element method |
getElementsByTagName | <K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>
<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>
<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>
<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>
(qualifiedName: string): HTMLCollectionOf<Element> | The |
getElementsByTagNameNS | (namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>
(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>
(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>
(namespace: string | null, localName: string): HTMLCollectionOf<Element> | The |
getHTML | (options?: GetHTMLOptions): string | The |
hasAttribute | (qualifiedName: string): boolean | The |
hasAttributeNS | (namespace: string | null, localName: string): boolean | The |
hasAttributes | (): boolean | The |
hasPointerCapture | (pointerId: number): boolean | The |
insertAdjacentElement | (where: InsertPosition, element: Element): Element | null | The |
insertAdjacentHTML | (position: InsertPosition, string: string): void | The |
insertAdjacentText | (where: InsertPosition, data: string): void | The |
matches | (selectors: string): boolean | The |
releasePointerCapture | (pointerId: number): void | The |
removeAttribute | (qualifiedName: string): void | The Element method |
removeAttributeNS | (namespace: string | null, localName: string): void | The |
removeAttributeNode | (attr: Attr): Attr | The |
requestFullscreen | (options?: FullscreenOptions): Promise<void> | The |
requestPointerLock | (options?: PointerLockOptions): Promise<void> | The |
scroll | (options?: ScrollToOptions): void
(x: number, y: number): void | The |
scrollBy | (options?: ScrollToOptions): void
(x: number, y: number): void | The |
scrollIntoView | (arg?: boolean | ScrollIntoViewOptions): void | The Element interface's |
scrollTo | (options?: ScrollToOptions): void
(x: number, y: number): void | The |
setAttribute | (qualifiedName: string, value: string): void | The |
setAttributeNS | (namespace: string | null, qualifiedName: string, value: string): void |
|
setAttributeNode | (attr: Attr): Attr | null | The |
setAttributeNodeNS | (attr: Attr): Attr | null | The |
setHTMLUnsafe | (html: string): void | The |
setPointerCapture | (pointerId: number): void | The |
toggleAttribute | (qualifiedName: string, force?: boolean): boolean | The |
webkitMatchesSelector | (selectors: string): boolean | |
textContent | string | |
baseURI | string | The read-only |
childNodes | NodeListOf<ChildNode> | The read-only |
firstChild | ChildNode | null | The read-only |
isConnected | boolean | The read-only |
lastChild | ChildNode | null | The read-only |
nextSibling | ChildNode | null | The read-only |
nodeName | string | The read-only |
nodeType | number | The read-only |
nodeValue | string | null | The |
parentElement | HTMLElement | null | The read-only |
parentNode | ParentNode | null | The read-only |
previousSibling | ChildNode | null | The read-only |
appendChild | <T extends Node>(node: T): T | The |
cloneNode | (subtree?: boolean): Node | The |
compareDocumentPosition | (other: Node): number | The |
contains | (other: Node | null): boolean | The |
getRootNode | (options?: GetRootNodeOptions): Node | The |
hasChildNodes | (): boolean | The |
insertBefore | <T extends Node>(node: T, child: Node | null): T | The |
isDefaultNamespace | (namespace: string | null): boolean | The |
isEqualNode | (otherNode: Node | null): boolean | The |
isSameNode | (otherNode: Node | null): boolean | The |
lookupNamespaceURI | (prefix: string | null): string | null | The |
lookupPrefix | (namespace: string | null): string | null | The |
normalize | (): void | The |
removeChild | <T extends Node>(child: T): T | The |
replaceChild | <T extends Node>(node: Node, child: T): T | The |
ELEMENT_NODE | 1 | node is an element. |
ATTRIBUTE_NODE | 2 | |
TEXT_NODE | 3 | node is a Text node. |
CDATA_SECTION_NODE | 4 | node is a CDATASection node. |
ENTITY_REFERENCE_NODE | 5 | |
ENTITY_NODE | 6 | |
PROCESSING_INSTRUCTION_NODE | 7 | node is a ProcessingInstruction node. |
COMMENT_NODE | 8 | node is a Comment node. |
DOCUMENT_NODE | 9 | node is a document. |
DOCUMENT_TYPE_NODE | 10 | node is a doctype. |
DOCUMENT_FRAGMENT_NODE | 11 | node is a DocumentFragment node. |
NOTATION_NODE | 12 | |
DOCUMENT_POSITION_DISCONNECTED | 1 | Set when node and other are not in the same tree. |
DOCUMENT_POSITION_PRECEDING | 2 | Set when other is preceding node. |
DOCUMENT_POSITION_FOLLOWING | 4 | Set when other is following node. |
DOCUMENT_POSITION_CONTAINS | 8 | Set when other is an ancestor of node. |
DOCUMENT_POSITION_CONTAINED_BY | 16 | Set when other is a descendant of node. |
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC | 32 | |
dispatchEvent | (event: Event): boolean | The |
ariaActiveDescendantElement | Element | null | |
ariaAtomic | string | null | |
ariaAutoComplete | string | null | |
ariaBrailleLabel | string | null | |
ariaBrailleRoleDescription | string | null | |
ariaBusy | string | null | |
ariaChecked | string | null | |
ariaColCount | string | null | |
ariaColIndex | string | null | |
ariaColIndexText | string | null | |
ariaColSpan | string | null | |
ariaControlsElements | readonly Element[] | null | |
ariaCurrent | string | null | |
ariaDescribedByElements | readonly Element[] | null | |
ariaDescription | string | null | |
ariaDetailsElements | readonly Element[] | null | |
ariaDisabled | string | null | |
ariaErrorMessageElements | readonly Element[] | null | |
ariaExpanded | string | null | |
ariaFlowToElements | readonly Element[] | null | |
ariaHasPopup | string | null | |
ariaHidden | string | null | |
ariaInvalid | string | null | |
ariaKeyShortcuts | string | null | |
ariaLabel | string | null | |
ariaLabelledByElements | readonly Element[] | null | |
ariaLevel | string | null | |
ariaLive | string | null | |
ariaModal | string | null | |
ariaMultiLine | string | null | |
ariaMultiSelectable | string | null | |
ariaOrientation | string | null | |
ariaOwnsElements | readonly Element[] | null | |
ariaPlaceholder | string | null | |
ariaPosInSet | string | null | |
ariaPressed | string | null | |
ariaReadOnly | string | null | |
ariaRelevant | string | null | |
ariaRequired | string | null | |
ariaRoleDescription | string | null | |
ariaRowCount | string | null | |
ariaRowIndex | string | null | |
ariaRowIndexText | string | null | |
ariaRowSpan | string | null | |
ariaSelected | string | null | |
ariaSetSize | string | null | |
ariaSort | string | null | |
ariaValueMax | string | null | |
ariaValueMin | string | null | |
ariaValueNow | string | null | |
ariaValueText | string | null | |
role | string | null | |
animate | (keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation | |
getAnimations | (options?: GetAnimationsOptions): Animation[] | |
after | (...nodes: (Node | string)[]): void | Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes. Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated. |
before | (...nodes: (Node | string)[]): void | Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes. Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated. |
remove | (): void | Removes node. |
replaceWith | (...nodes: (Node | string)[]): void | Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes. Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated. |
nextElementSibling | Element | null | Returns the first following sibling that is an element, and null otherwise. |
previousElementSibling | Element | null | Returns the first preceding sibling that is an element, and null otherwise. |
childElementCount | number | |
children | HTMLCollection | Returns the child elements. |
firstElementChild | Element | null | Returns the first child that is an element, and null otherwise. |
lastElementChild | Element | null | Returns the last child that is an element, and null otherwise. |
append | (...nodes: (Node | string)[]): void | Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes. Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated. |
prepend | (...nodes: (Node | string)[]): void | Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes. Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated. |
querySelector | <K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null
<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null
<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null
<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null
<E extends Element = Element>(selectors: string): E | null | Returns the first element that is a descendant of node that matches selectors. |
querySelectorAll | <K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>
<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>
<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>
<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>
<E extends Element = Element>(selectors: string): NodeListOf<E> | Returns all element descendants of node that match selectors. |
replaceChildren | (...nodes: (Node | string)[]): void | Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes. Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated. |
assignedSlot | HTMLSlotElement | null | |
attributeStyleMap | StylePropertyMap | |
style | CSSStyleDeclaration | |
contentEditable | string | |
enterKeyHint | string | |
inputMode | string | |
isContentEditable | boolean | |
onabort | ((this: GlobalEventHandlers, ev: UIEvent) => any) | null | |
onanimationcancel | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null | |
onanimationend | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null | |
onanimationiteration | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null | |
onanimationstart | ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null | |
onauxclick | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null | |
onbeforeinput | ((this: GlobalEventHandlers, ev: InputEvent) => any) | null | |
onbeforematch | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onbeforetoggle | ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null | |
onblur | ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null | |
oncancel | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
oncanplay | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
oncanplaythrough | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onchange | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onclick | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null | |
onclose | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
oncontextlost | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
oncontextmenu | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null | |
oncontextrestored | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
oncopy | ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null | |
oncuechange | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
oncut | ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null | |
ondblclick | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null | |
ondrag | ((this: GlobalEventHandlers, ev: DragEvent) => any) | null | |
ondragend | ((this: GlobalEventHandlers, ev: DragEvent) => any) | null | |
ondragenter | ((this: GlobalEventHandlers, ev: DragEvent) => any) | null | |
ondragleave | ((this: GlobalEventHandlers, ev: DragEvent) => any) | null | |
ondragover | ((this: GlobalEventHandlers, ev: DragEvent) => any) | null | |
ondragstart | ((this: GlobalEventHandlers, ev: DragEvent) => any) | null | |
ondrop | ((this: GlobalEventHandlers, ev: DragEvent) => any) | null | |
ondurationchange | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onemptied | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onended | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onerror | OnErrorEventHandler | |
onfocus | ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null | |
onformdata | ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null | |
ongotpointercapture | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null | |
oninput | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
oninvalid | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onkeydown | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null | |
onkeypress | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null | |
onkeyup | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null | |
onload | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onloadeddata | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onloadedmetadata | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onloadstart | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onlostpointercapture | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null | |
onmousedown | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null | |
onmouseenter | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null | |
onmouseleave | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null | |
onmousemove | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null | |
onmouseout | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null | |
onmouseover | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null | |
onmouseup | ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null | |
onpaste | ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null | |
onpause | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onplay | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onplaying | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onpointercancel | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null | |
onpointerdown | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null | |
onpointerenter | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null | |
onpointerleave | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null | |
onpointermove | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null | |
onpointerout | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null | |
onpointerover | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null | |
onpointerrawupdate | ((this: GlobalEventHandlers, ev: Event) => any) | null | Available only in secure contexts. |
onpointerup | ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null | |
onprogress | ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null | |
onratechange | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onreset | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onresize | ((this: GlobalEventHandlers, ev: UIEvent) => any) | null | |
onscroll | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onscrollend | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onsecuritypolicyviolation | ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null | |
onseeked | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onseeking | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onselect | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onselectionchange | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onselectstart | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onslotchange | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onstalled | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onsubmit | ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null | |
onsuspend | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
ontimeupdate | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
ontoggle | ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null | |
ontouchcancel (optional) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | |
ontouchend (optional) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | |
ontouchmove (optional) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | |
ontouchstart (optional) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | |
ontransitioncancel | ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null | |
ontransitionend | ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null | |
ontransitionrun | ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null | |
ontransitionstart | ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null | |
onvolumechange | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onwaiting | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onwebkitanimationend | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onwebkitanimationiteration | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onwebkitanimationstart | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onwebkittransitionend | ((this: GlobalEventHandlers, ev: Event) => any) | null | |
onwheel | ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null | |
autofocus | boolean | |
dataset | DOMStringMap | |
nonce (optional) | string | undefined | |
tabIndex | number | |
blur | (): void | |
focus | (options?: FocusOptions): void |
Examples
import "@johnmorrisdotca/jarajara/element/define";
import { JarajaraLayout } from "@johnmorrisdotca/jarajara/element";
const tile = document.createElement("jarajara-layout") as JarajaraLayout;
tile.setAttribute("size","4");
tile.setAttribute("seed","2026");
document.body.append(tile);
console.log(tile.tagName);