HataFlagElement型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What <hata-flag> adds to an ordinary element. Every attribute is also a property that writes it, as React, Vue
and Svelte set them; border and shadow read as booleans. ready settles when the picture is drawn, or
found to have no flag (it is then false).
インポート
import type { HataFlagElement } from "@johnmorrisdotca/hata/element";
定義
type HataFlagElement = HTMLElement & {
get code(): string | null;
set code(value: string | null | undefined);
get shape(): string | null;
set shape(value: string | null | undefined);
get width(): string | null;
set width(value: string | number | null | undefined);
get size(): string | null;
set size(value: string | number | null | undefined);
get fit(): string | null;
set fit(value: string | null | undefined);
get variant(): string | null;
set variant(value: string | null | undefined);
get label(): string | null;
set label(value: string | null | undefined);
get theme(): string | null;
set theme(value: string | null | undefined);
get border(): boolean;
set border(value: boolean | string | null | undefined);
get shadow(): boolean;
set shadow(value: boolean | string | null | undefined);
get loading(): string | null;
set loading(value: string | null | undefined);
readonly ready: Promise<boolean>;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
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 MDN Reference
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 MDN Reference
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 (省略可) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | |
ontouchend (省略可) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | |
ontouchmove (省略可) | ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | |
ontouchstart (省略可) | ((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 (省略可) | string | undefined | |
tabIndex | number | |
blur | (): void | |
focus | (options?: FocusOptions): void | |
code | string | null | |
shape | string | null | |
width | string | null | Width in CSS pixels, overriding the height-based size; null inherits the page. |
size | string | null | |
fit | string | null | |
variant | string | null | |
label | string | null | |
theme | string | null | |
border | boolean | |
shadow | boolean | |
loading | string | null | |
ready | Promise<boolean> | Settles when the picture is drawn ( |
例
import "@johnmorrisdotca/hata/element/define";
import type { HataFlagElement } from "@johnmorrisdotca/hata/element";
const tokyo = document.createElement("hata-flag") as HataFlagElement;
tokyo.code = "JP-13";
tokyo.size = 48;
console.log(document.body.append(tokyo));
console.log(await tokyo.ready); // true once drawnこの日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。