mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
10 lines
263 B
TypeScript
10 lines
263 B
TypeScript
/**
|
|
* Clears all <option> elements from a <select>.
|
|
* @param selector The <select> element
|
|
*/
|
|
export function clearSelector(selector: HTMLSelectElement) {
|
|
for (let i: number = selector.options.length - 1; i >= 0; i--) {
|
|
selector.remove(i);
|
|
}
|
|
}
|