Refactor scripts
This commit is contained in:
7
scripts/Utils/findAllInside.ts
Normal file
7
scripts/Utils/findAllInside.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export default function* findAllInside(className: string, root: HTMLElement): IterableIterator<HTMLElement> {
|
||||
const elements = root.getElementsByClassName(className)
|
||||
|
||||
for(const element of elements) {
|
||||
yield element as HTMLElement
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user