Skip to content

HTMLOptionsCollection

Values

add

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. Read more on MDN

let add: (
WebAPI.DOMAPI.htmlOptionsCollection,
~element: unknown,
~before: unknown=?,
) => unit

Parameters

WebAPI.DOMAPI.htmlOptionsCollection unknown option< unknown >

Return type

unit

remove

Removes the item with index index from the collection. Read more on MDN

let remove: (WebAPI.DOMAPI.htmlOptionsCollection, int) => unit

Parameters

WebAPI.DOMAPI.htmlOptionsCollection int

Return type

unit