Use for/of and remove loop variables

This commit is contained in:
Kevin Sawicki 2016-11-03 11:09:53 -07:00
parent 6eab14359c
commit 0e1c2b0fcb
3 changed files with 13 additions and 20 deletions

View file

@ -212,11 +212,9 @@ class SrcAttribute extends WebViewAttribute {
// spawns off a new process.
setupMutationObserver () {
this.observer = new MutationObserver((mutations) => {
let i, len, mutation, newValue, oldValue
for (i = 0, len = mutations.length; i < len; i++) {
mutation = mutations[i]
oldValue = mutation.oldValue
newValue = this.getValue()
for (const mutation of mutations) {
const {oldValue} = mutation
const newValue = this.getValue()
if (oldValue !== newValue) {
return
}