diff --git a/lib/common/parse-features-string.js b/lib/common/parse-features-string.js index 2c74c3463dc..a700617e6c9 100644 --- a/lib/common/parse-features-string.js +++ b/lib/common/parse-features-string.js @@ -1,12 +1,11 @@ // parses a feature string that has the format used in window.open() -// - `str` input string +// - `features` input string // - `emit` function(key, value) - called for each parsed KV module.exports = function parseFeaturesString (features, emit) { // split the string by ',' features.split(/,\s*/).forEach((feature) => { - // expected form is either a key by itself (true boolean flag) - // or a key/value, in the form of 'key=value' - // split the tokens by '=' + // expected form is either a key by itself or a key/value pair in the form of + // 'key=value' let [key, value] = feature.split(/\s*=/) if (!key) return diff --git a/lib/renderer/override.js b/lib/renderer/override.js index 8c00661ddbe..6b5e0e1615d 100644 --- a/lib/renderer/override.js +++ b/lib/renderer/override.js @@ -89,7 +89,7 @@ if (process.guestInstanceId == null) { // Make the browser window or guest view emit "new-window" event. window.open = function (url, frameName, features) { - var feature, guestId, i, j, len, len1, name, options, ref1, ref2, value, additionalFeatures + var guestId, j, len1, name, options, additionalFeatures if (frameName == null) { frameName = '' }