bitburner-src/utils/uiHelpers/appendLineBreaks.ts

13 lines
393 B
TypeScript
Raw Normal View History

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.
*/
2021-05-01 09:17:31 +02:00
export function appendLineBreaks(el: HTMLElement, n: number): void {
2021-04-30 05:52:56 +02:00
for (let i = 0; i < n; ++i) {
el.appendChild(createElement("br"));
}
}