@nextcloud/dialogs
    Preparing search index...

    Interface HTMLOptionsCollection

    The HTMLOptionsCollection interface represents a collection of <option> HTML elements (in document order) and offers methods and properties for selecting from the list as well as optionally altering its items.

    MDN Reference

    interface HTMLOptionsCollection {
        length: number;
        selectedIndex: number;
        add(
            element: HTMLOptGroupElement | HTMLOptionElement,
            before?: null | number | HTMLElement,
        ): void;
        item(index: number): null | HTMLOptionElement;
        namedItem(name: string): null | HTMLOptionElement;
        remove(index: number): void;
        [index: number]: HTMLOptionElement;
    }

    Hierarchy (View Summary)

    Indexable

    Index

    Properties

    length: number

    The length property of the HTMLOptionsCollection interface returns the number of option elements in the collection.

    MDN Reference

    selectedIndex: number

    The selectedIndex property of the HTMLOptionsCollection interface is the numeric index of the first selected option element, if any, or −1 if no <option> is selected.

    MDN Reference

    Methods

    • The remove() method of the HTMLOptionsCollection interface removes the option element specified by the index from this collection.

      MDN Reference

      Parameters

      • index: number

      Returns void