@nextcloud/dialogs
    Preparing search index...

    Interface DOMTokenList

    The DOMTokenList interface represents a set of space-separated tokens.

    MDN Reference

    interface DOMTokenList {
        length: number;
        value: string;
        add(...tokens: string[]): void;
        contains(token: string): boolean;
        forEach(
            callbackfn: (value: string, key: number, parent: DOMTokenList) => void,
            thisArg?: any,
        ): void;
        item(index: number): null | string;
        remove(...tokens: string[]): void;
        replace(token: string, newToken: string): boolean;
        supports(token: string): boolean;
        toggle(token: string, force?: boolean): boolean;
        toString(): string;
        [index: number]: string;
    }

    Indexable

    • [index: number]: string
    Index

    Properties

    length: number

    The read-only length property of the DOMTokenList interface is an integer representing the number of objects stored in the object.

    MDN Reference

    value: string

    The value property of the DOMTokenList interface is a stringifier that returns the value of the list serialized as a string, or clears and sets the list to the given value.

    MDN Reference

    Methods

    • The add() method of the DOMTokenList interface adds the given tokens to the list, omitting any that are already present.

      MDN Reference

      Parameters

      • ...tokens: string[]

      Returns void

    • The contains() method of the DOMTokenList interface returns a boolean value — true if the underlying list contains the given token, otherwise false.

      MDN Reference

      Parameters

      • token: string

      Returns boolean

    • Parameters

      • callbackfn: (value: string, key: number, parent: DOMTokenList) => void
      • OptionalthisArg: any

      Returns void

    • The item() method of the DOMTokenList interface returns an item in the list, determined by its position in the list, its index.

      MDN Reference

      Parameters

      • index: number

      Returns null | string

    • The remove() method of the DOMTokenList interface removes the specified tokens from the list.

      MDN Reference

      Parameters

      • ...tokens: string[]

      Returns void

    • The replace() method of the DOMTokenList interface replaces an existing token with a new token.

      MDN Reference

      Parameters

      • token: string
      • newToken: string

      Returns boolean

    • The supports() method of the DOMTokenList interface returns true if a given token is in the associated attribute's supported tokens.

      MDN Reference

      Parameters

      • token: string

      Returns boolean

    • The toggle() method of the DOMTokenList interface removes an existing token from the list and returns false.

      MDN Reference

      Parameters

      • token: string
      • Optionalforce: boolean

      Returns boolean

    • Returns string