Skip to content

@ralphschuler.webgl shader factory.<internal>.DOMTokenList

github-actions edited this page Nov 26, 2023 · 1 revision

Interface: DOMTokenList

@ralphschuler/webgl-shader-factory.<internal>.DOMTokenList

A set of space-separated tokens. Such a set is returned by Element.classList, HTMLLinkElement.relList, HTMLAnchorElement.relList, HTMLAreaElement.relList, HTMLIframeElement.sandbox, or HTMLOutputElement.htmlFor. It is indexed beginning with 0 as with JavaScript Array objects. DOMTokenList is always case-sensitive.

MDN Reference

Indexable

▪ [index: number]: string

Table of contents

Properties

Methods

Properties

length

Readonly length: number

Returns the number of tokens.

MDN Reference

Defined in

node_modules/typescript/lib/lib.dom.d.ts:6384


value

value: string

Returns the associated set as string.

Can be set, to change the associated attribute.

MDN Reference

Defined in

node_modules/typescript/lib/lib.dom.d.ts:6392

Methods

add

add(...tokens): void

Adds all arguments passed, except those already present.

Throws a "SyntaxError" DOMException if one of the arguments is the empty string.

Throws an "InvalidCharacterError" DOMException if one of the arguments contains any ASCII whitespace.

MDN Reference

Parameters

Name Type
...tokens string[]

Returns

void

Defined in

node_modules/typescript/lib/lib.dom.d.ts:6403


contains

contains(token): boolean

Returns true if token is present, and false otherwise.

MDN Reference

Parameters

Name Type
token string

Returns

boolean

Defined in

node_modules/typescript/lib/lib.dom.d.ts:6409


forEach

forEach(callbackfn, thisArg?): void

Parameters

Name Type
callbackfn (value: string, key: number, parent: DOMTokenList) => void
thisArg? any

Returns

void

Defined in

node_modules/typescript/lib/lib.dom.d.ts:6458


item

item(index): null | string

Returns the token with index index.

MDN Reference

Parameters

Name Type
index number

Returns

null | string

Defined in

node_modules/typescript/lib/lib.dom.d.ts:6415


remove

remove(...tokens): void

Removes arguments passed, if they are present.

Throws a "SyntaxError" DOMException if one of the arguments is the empty string.

Throws an "InvalidCharacterError" DOMException if one of the arguments contains any ASCII whitespace.

MDN Reference

Parameters

Name Type
...tokens string[]

Returns

void

Defined in

node_modules/typescript/lib/lib.dom.d.ts:6425


replace

replace(token, newToken): boolean

Replaces token with newToken.

Returns true if token was replaced with newToken, and false otherwise.

Throws a "SyntaxError" DOMException if one of the arguments is the empty string.

Throws an "InvalidCharacterError" DOMException if one of the arguments contains any ASCII whitespace.

MDN Reference

Parameters

Name Type
token string
newToken string

Returns

boolean

Defined in

node_modules/typescript/lib/lib.dom.d.ts:6437


supports

supports(token): boolean

Returns true if token is in the associated attribute's supported tokens. Returns false otherwise.

Throws a TypeError if the associated attribute has no supported tokens defined.

MDN Reference

Parameters

Name Type
token string

Returns

boolean

Defined in

node_modules/typescript/lib/lib.dom.d.ts:6445


toString

toString(): string

Returns

string

Defined in

node_modules/typescript/lib/lib.dom.d.ts:6393


toggle

toggle(token, force?): boolean

If force is not given, "toggles" token, removing it if it's present and adding it if it's not present. If force is true, adds token (same as add()). If force is false, removes token (same as remove()).

Returns true if token is now present, and false otherwise.

Throws a "SyntaxError" DOMException if token is empty.

Throws an "InvalidCharacterError" DOMException if token contains any spaces.

MDN Reference

Parameters

Name Type
token string
force? boolean

Returns

boolean

Defined in

node_modules/typescript/lib/lib.dom.d.ts:6457

Typescript Libraries

Modules

Namespaces

Clone this wiki locally