Bug 1293305 - Part 1.8: Do not use non-standard for-each. r=sebastian

This commit is contained in:
Tooru Fujisawa 2016-11-21 15:03:44 +09:00
parent 62e286f0d5
commit ae8843de1e

View File

@ -4397,14 +4397,14 @@ Tab.prototype = {
const mediaDurationThreshold = 1.0;
let audioElements = this.browser.contentDocument.getElementsByTagName("audio");
for each (let audio in audioElements) {
for (let audio of audioElements) {
if (audio.paused == inactive && audio.duration > mediaDurationThreshold) {
return true;
}
}
let videoElements = this.browser.contentDocument.getElementsByTagName("video");
for each (let video in videoElements) {
for (let video of videoElements) {
if (video.paused == inactive && video.duration > mediaDurationThreshold) {
return true;
}