Remove lint warnings

This commit is contained in:
Kevin Sawicki 2016-10-25 10:36:43 +09:00
parent 3aad6a0c99
commit 68c2c9825f
2 changed files with 4 additions and 5 deletions

View file

@ -1,12 +1,11 @@
// parses a feature string that has the format used in window.open() // 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 // - `emit` function(key, value) - called for each parsed KV
module.exports = function parseFeaturesString (features, emit) { module.exports = function parseFeaturesString (features, emit) {
// split the string by ',' // split the string by ','
features.split(/,\s*/).forEach((feature) => { features.split(/,\s*/).forEach((feature) => {
// expected form is either a key by itself (true boolean flag) // expected form is either a key by itself or a key/value pair in the form of
// or a key/value, in the form of 'key=value' // 'key=value'
// split the tokens by '='
let [key, value] = feature.split(/\s*=/) let [key, value] = feature.split(/\s*=/)
if (!key) return if (!key) return

View file

@ -89,7 +89,7 @@ if (process.guestInstanceId == null) {
// Make the browser window or guest view emit "new-window" event. // Make the browser window or guest view emit "new-window" event.
window.open = function (url, frameName, features) { 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) { if (frameName == null) {
frameName = '' frameName = ''
} }