Skip to content

Commit

Permalink
fix(firefox): enable domains in a proper order (#4077)
Browse files Browse the repository at this point in the history
Otherwise we might get console messages from Page domain before
we get execution contexts reported.
  • Loading branch information
aslushnikov committed Feb 27, 2019
1 parent 9ef23b1 commit dae998e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions experimental/puppeteer-firefox/lib/Page.js
Expand Up @@ -27,9 +27,9 @@ class Page extends EventEmitter {
static async create(session, target, defaultViewport) {
const page = new Page(session, target);
await Promise.all([
session.send('Page.enable'),
session.send('Network.enable'),
session.send('Runtime.enable'),
session.send('Network.enable'),
session.send('Page.enable'),
]);

if (defaultViewport)
Expand Down Expand Up @@ -729,9 +729,6 @@ class Page extends EventEmitter {
return await this._frameManager.mainFrame().setContent(html);
}

_onClosed() {
}

_onConsole({type, args, executionContextId, location}) {
const context = this._frameManager.executionContextById(executionContextId);
this.emit(Events.Page.Console, new ConsoleMessage(type, args.map(arg => createHandle(context, arg)), location));
Expand Down

0 comments on commit dae998e

Please sign in to comment.