docs: demo flags in example of programmatic use#3841
Merged
paulirish merged 2 commits intoGoogleChrome:masterfrom Jan 11, 2018
Merged
docs: demo flags in example of programmatic use#3841paulirish merged 2 commits intoGoogleChrome:masterfrom
paulirish merged 2 commits intoGoogleChrome:masterfrom
Conversation
In the current documentation, the example given does not pass the flags argument to `chromeLauncher.launch` which caused some initial confusion when trying to leverage any of the chromeFlags. It is not intuitive that flags should also be passed into the launch method.
|
Will let Paul make the final call here, but this is OK with me :) |
paulirish
requested changes
Nov 17, 2017
docs/readme.md
Outdated
|
|
||
| function launchChromeAndRunLighthouse(url, flags = {}, config = null) { | ||
| return chromeLauncher.launch().then(chrome => { | ||
| return chromeLauncher.launch(flags).then(chrome => { |
Member
There was a problem hiding this comment.
launch() takes an opts object
a prop of that object is chromeFlags .. so perhaps rename flags to launchOpts and add in a chromeFlags: ['--disable-popup-blocking'] into it for a clear example?
Member
|
@nhodges thanks for this PR.. but there's an error in it. do you have the time to update it? thx! 🏖 |
Contributor
Author
|
@paulirish Hey, thanks for the feedback! Sorry I haven't gotten to it sooner -- was in the middle of a move. (Thanks for the nudge.) I'll gladly update my PR, probably tomorrow evening. |
Member
|
@nhodges nudge ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In the current documentation, the example given does not pass the flags argument to
chromeLauncher.launchwhich caused some initial confusion when trying to leverage any of the chromeFlags. It is not intuitive that flags should also be passed into the launch method.