bitburner-src/utils/uiHelpers/appendLineBreaks.ts
2021-09-04 19:09:30 -04:00

13 lines
385 B
TypeScript

import { createElement } from "./createElement";
/**
* Appends the specified number of breaks (as children) to the specified element
* @param el The element to add child break elements to.
* @param n The number of breaks to add.
*/
export function appendLineBreaks(el: HTMLElement, n: number): void {
for (let i = 0; i < n; ++i) {
el.appendChild(createElement("br"));
}
}