Skip to content

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

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

Interface: HTMLOptionsCollection

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

HTMLOptionsCollection is an interface representing a collection of HTML option elements (in document order) and offers methods and properties for traversing the list as well as optionally altering its items. This type is returned solely by the "options" property of select.

MDN Reference

Hierarchy

Table of contents

Properties

Methods

Properties

length

length: number

Returns the number of elements in the collection.

When set to a smaller number, truncates the number of option elements in the corresponding container.

When set to a greater number, adds new blank option elements to that container.

MDN Reference

Overrides

HTMLCollectionOf.length

Defined in

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


selectedIndex

selectedIndex: number

Returns the index of the first selected item, if any, or −1 if there is no selected item.

Can be set, to change the selection.

MDN Reference

Defined in

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

Methods

add

add(element, before?): void

Inserts element before the node given by before.

The before argument can be a number, in which case element is inserted before the item with that number, or an element from the collection, in which case element is inserted before that element.

If before is omitted, null, or a number out of range, then element will be added at the end of the list.

This method will throw a "HierarchyRequestError" DOMException if element is an ancestor of the element into which it is to be inserted.

MDN Reference

Parameters

Name Type
element HTMLOptGroupElement | HTMLOptionElement
before? null | number | HTMLElement

Returns

void

Defined in

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


item

item(index): null | HTMLOptionElement

Retrieves an object from various collections.

MDN Reference

Parameters

Name Type
index number

Returns

null | HTMLOptionElement

Inherited from

HTMLCollectionOf.item

Defined in

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


namedItem

namedItem(name): null | HTMLOptionElement

Parameters

Name Type
name string

Returns

null | HTMLOptionElement

Inherited from

HTMLCollectionOf.namedItem

Defined in

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


remove

remove(index): void

Removes the item with index index from the collection.

MDN Reference

Parameters

Name Type
index number

Returns

void

Defined in

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

Typescript Libraries

Modules

Namespaces

Clone this wiki locally