Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] - Allow redirection of page console output to host console.log without forcing headless = false #121

Open
skj2e opened this issue Mar 19, 2024 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@skj2e
Copy link

skj2e commented Mar 19, 2024

Hi there,

A useful option for me would be the ability to make use of the functionality defined in the page.on('console', ...) event handler enabled by debug without forcing headless = true.

Currently I am unable to access to the page object (unless I am mistaken) in preloadFunction and the beforeScreenshot handler loads too late for my use case.

@sindresorhus
Copy link
Owner

I think it would be useful to add an option here like onConsole or onConsoleOutput that would provide the output of page.on('console', ...).

@sindresorhus sindresorhus added enhancement New feature or request help wanted Extra attention is needed labels Mar 20, 2024
@skj2e
Copy link
Author

skj2e commented Mar 20, 2024

That would be super. If I get a chance I'll try and put together a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants