k6 icon indicating copy to clipboard operation
k6 copied to clipboard

Feature/remove event listener

Open ekgns33 opened this issue 5 months ago • 1 comments

What?

This PR adds Off function which remove registered event-listener function mapped to user specified event.

Why?

As Issue #4823 describes, k6 doesn't have interface for removing event-listener of websocket.

Checklist

  • [x] I have performed a self-review of my code.
  • [x] I have commented on my code, particularly in hard-to-understand areas.
  • [x] I have added tests for my changes.
  • [x] I have run linter and tests locally (make check) and all pass.

Checklist: Documentation (only for k6 maintainers and if relevant)

Please do not merge this PR until the following items are filled out.

  • [ ] I have added the correct milestone and labels to the PR.
  • [ ] I have updated the release notes: link
  • [ ] I have updated or added an issue to the k6-documentation: grafana/k6-docs#NUMBER if applicable
  • [ ] I have updated or added an issue to the TypeScript definitions: grafana/k6-DefinitelyTyped#NUMBER if applicable

Related PR(s)/Issue(s)

#4823

ekgns33 avatar Jun 11 '25 04:06 ekgns33