Use getElementsByClassName
This commit is contained in:
parent
70c15f0f93
commit
d197fb30fb
@ -129,7 +129,7 @@ export class AnimeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unmountMountables() {
|
unmountMountables() {
|
||||||
for(let element of findAll("mounted")) {
|
for(let element of findAll("mountable")) {
|
||||||
element.classList.remove("mounted")
|
element.classList.remove("mounted")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
export function* findAll(className: string) {
|
export function* findAll(className: string) {
|
||||||
// getElementsByClassName failed for some reason.
|
// getElementsByClassName failed for some reason.
|
||||||
// TODO: Test getElementsByClassName again.
|
// TODO: Test getElementsByClassName again.
|
||||||
let elements = document.querySelectorAll("." + className)
|
// let elements = document.querySelectorAll("." + className)
|
||||||
|
let elements = document.getElementsByClassName(className)
|
||||||
|
|
||||||
for(let i = 0; i < elements.length; ++i) {
|
for(let i = 0; i < elements.length; ++i) {
|
||||||
yield elements[i] as HTMLElement
|
yield elements[i] as HTMLElement
|
||||||
|
Loading…
Reference in New Issue
Block a user