Use const variables when applicable

This commit is contained in:
2019-11-17 18:25:14 +09:00
parent 454e8572e3
commit 878f1913e3
39 changed files with 405 additions and 403 deletions

View File

@ -1,5 +1,5 @@
export function* findAll(className: string): IterableIterator<HTMLElement> {
let elements = document.getElementsByClassName(className)
const elements = document.getElementsByClassName(className)
for(let i = 0; i < elements.length; ++i) {
yield elements[i] as HTMLElement
@ -7,7 +7,7 @@ export function* findAll(className: string): IterableIterator<HTMLElement> {
}
export function* findAllInside(className: string, root: HTMLElement): IterableIterator<HTMLElement> {
let elements = root.getElementsByClassName(className)
const elements = root.getElementsByClassName(className)
for(let i = 0; i < elements.length; ++i) {
yield elements[i] as HTMLElement