Delay DOM mutation

This commit is contained in:
Eduard Urbach 2018-12-08 07:12:41 +09:00
parent 3776b87d7e
commit 07a8bb0ffa

View File

@ -933,9 +933,12 @@ export default class AnimeNotifier {
let minutes = Math.trunc(time / 60)
let seconds = Math.trunc(time) % 60
let paddedSeconds = ("00" + seconds).slice(-2)
Diff.mutations.queue(() => {
timeElement.textContent = `${minutes}:${paddedSeconds}`
progressElement.style.transform = `scaleX(${time / video.duration})`
})
})
video.addEventListener("waiting", () => {
this.loading(true)