Fix ESLint failures (#34)

References #33
This commit is contained in:
Paul Irish
2017-06-20 17:32:08 -07:00
committed by Pavel Feldman
parent a033b1b7ac
commit a66480a416
5 changed files with 8 additions and 16 deletions

View File

@@ -123,7 +123,7 @@ class Page extends EventEmitter {
await this._client.send('Runtime.evaluate', { expression, returnByValue: true });
function inPageCallback(callbackName) {
window[callbackName] = async (...args) => {
window[callbackName] = async(...args) => {
const me = window[callbackName];
let callbacks = me['callbacks'];
if (!callbacks) {
@@ -133,6 +133,7 @@ class Page extends EventEmitter {
const seq = (me['lastSeq'] || 0) + 1;
me['lastSeq'] = seq;
const promise = new Promise(fulfill => callbacks.set(seq, fulfill));
// eslint-disable-next-line no-console
console.debug('driver:InPageCallback', JSON.stringify({name: callbackName, seq, args}));
return promise;
};
@@ -523,17 +524,6 @@ class Page extends EventEmitter {
}
}
class InPageCallback {
/**
* @param {string} name
* @param {function(?):?} callback
*/
constructor(name, callback) {
this.name = name;
this.callback = callback;
}
}
/** @enum {string} */
Page.PaperFormats = {
Letter: {width: 8.5, height: 11},