TypeScript cleanup
This commit is contained in:
7
scripts/Utils/findAll.ts
Normal file
7
scripts/Utils/findAll.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export function* findAll(className: string): IterableIterator<HTMLElement> {
|
||||
let elements = document.getElementsByClassName(className)
|
||||
|
||||
for(let i = 0; i < elements.length; ++i) {
|
||||
yield elements[i] as HTMLElement
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user