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

Do not expose browser.on() #919

Merged
merged 2 commits into from
Jun 2, 2023
Merged

Do not expose browser.on() #919

merged 2 commits into from
Jun 2, 2023

Conversation

ka3de
Copy link
Collaborator

@ka3de ka3de commented Jun 1, 2023

Description of changes

Considering the API changes made in #910, for which the browser initialization/closing procedures are no longer delegated/exposed to the end user, but instead are automatically handled by k6 browser implementation from the Go layer, currently the browser.on() method is not providing any value as we are only supporting the disconnect event.

Therefor, a decision is made to not expose this method by now, until more events types are supported.

Closes #913 .

Optional tasks

Tasks

ka3de added 2 commits June 1, 2023 16:56
A decision was made to no longer expose browser.on method as it
currently only supports 'disconnect' event, and that is non applicable
after the changes made to abstract the browser initialization/closing
procedures from the JS API in
#910.
Copy link
Collaborator

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

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

LGTM

@ka3de ka3de merged commit d051c0e into main Jun 2, 2023
@ka3de ka3de deleted the fix/913-browser-on-disconnect branch June 2, 2023 13:18
ankur22 added a commit to grafana/k6-DefinitelyTyped that referenced this pull request Jun 30, 2023
This has been removed from the browser module. See
grafana/xk6-browser#919 for more details.
typescript-bot pushed a commit to DefinitelyTyped/DefinitelyTyped that referenced this pull request Aug 3, 2023
* Refactor browserContext into its own file

* Add type definition for browser

* Add type definition for browserContext

* Apply suggestions from code review

Co-authored-by: ka3de <danijs12@hotmail.com>

* Remove browser.on from k6 browser module

This has been removed from the browser module. See
grafana/xk6-browser#919 for more details.

* Move all k6 browser module definitions into one

There's an issue with importing the type definitions for the k6
browser module where the actual definitions aren't displaying but
the types can be imported whereby the IDE recognises the types.

We've found that by moving them into a single file helps resolves this
issue.

---------

Co-authored-by: ka3de <danijs12@hotmail.com>
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.

browser.on('disconnect') hangs when browser is abstracted from JS API
3 participants