mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-22 01:03:01 +02:00
[refactor] Moved 'clearSelector' to its own TS file.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user