Skip to content

Conversation

@aslushnikov
Copy link
Contributor

This patch introduces ExecutionContext.frame() that returns Frame
associated with this Execution Context.

This allows to associate console messages with the originating frame,
if any.

@JoelEinbinder
Copy link
Contributor

Why do we need to associate console messages with frames?

docs/api.md Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like workers and content scripts have null frames? The note here is not helpful, it doesn’t explain why.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@JoelEinbinder added a better explanation.

@aslushnikov
Copy link
Contributor Author

@JoelEinbinder IIRC, someone wanted to wait for the frame to load relying on the console.log it emitted. I found this patch locally; someone on the bugtracker wanted this sometime ago.

@aslushnikov aslushnikov force-pushed the expose-executioncontext-frame branch from ad25228 to 90c62b3 Compare February 7, 2018 18:33
This patch introduces ExecutionContext.frame() that returns Frame
associated with this Execution Context.

This allows to associate console messages with the originating frame,
if any.
@aslushnikov aslushnikov force-pushed the expose-executioncontext-frame branch from 90c62b3 to e8dab28 Compare February 13, 2018 21:39
@aslushnikov aslushnikov merged commit ae22ef3 into puppeteer:master Feb 13, 2018
@aslushnikov aslushnikov deleted the expose-executioncontext-frame branch May 9, 2018 01:14
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.

2 participants