-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quit Chrome instance gracefully, if an abort signal is sent
Fix #30
- Loading branch information
1 parent
06e84a6
commit ea5a616
Showing
4 changed files
with
114 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package browser | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/chromedp/chromedp" | ||
) | ||
|
||
// Quit cancels a chromedp context, waits for its resources to be cleaned up, | ||
// and returns any error encountered during that process. | ||
// | ||
// ctx needs to be a chromedp.Context to work properly. | ||
func Quit(ctx context.Context) error { | ||
return chromedp.Cancel(ctx) | ||
} |