feat(page): Adding support for referrerPolicy in page.goto
#9561
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: #9394
What kind of change does this PR introduce?
Feature - Added support of the
referrerPolicy
parameter (from CDP'sPage.navigate
) to Puppeteer'spage.goto
.Did you add tests for your changes?
No, currently it has no meaning that isn't browser implementation based, which might get broken in the future. If there are suggestions to tests, please let me know so I'll add them.
If relevant, did you update the documentation?
Yes, the documentation of the
goto
method has been updated.Summary
I wanted to contribute to this project, which I used for testing on our environment and saw issue #9394, so I decided to resolve it :)
Does this PR introduce a breaking change?
No. I added the
referrerPolicy
as an optional parameter, which will use the HTTP headerReferrer-Policy
if not provided (much like thereferer
parameter) so it will not interfere.