Use for/of and remove loop variables
This commit is contained in:
parent
6eab14359c
commit
0e1c2b0fcb
3 changed files with 13 additions and 20 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue