Skip to content

Conversation

@aslushnikov
Copy link
Contributor

This patch introduces ConsoleMessage type and starts dispatching
it for the 'console' event.

BREAKING CHANGE: this breaks the api of the 'console' event.

Fixes #744.

lib/Page.js Outdated
}
const values = await Promise.all(event.args.map(arg => helper.serializeRemoteObject(this._client, arg)));
this.emit(Page.Events.Console, ...values);
const text = values.length && typeof values[0] === 'string' ? values[0] : null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make text all the values.join(" ")


Dialog's type, could be one of the `alert`, `beforeunload`, `confirm` and `prompt`.

### class: ConsoleMessage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline this into the console event?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine like this

@vsemozhetbyt
Copy link
Contributor

vsemozhetbyt commented Sep 29, 2017

@aslushnikov aslushnikov merged commit f625502 into puppeteer:master Sep 29, 2017
@aslushnikov aslushnikov deleted the introduce-console-message branch October 10, 2017 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants