github / github/stable-socket

Should `StableSocket` just extend `EventTarget`

Open
#6 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
143
Forks
18
Avg merge
7h 55m
Merged PRs (30d)
2

Description

It's a little un-idiomatic to use delegate objects as a "callback bag" in the Web Platform.

This could potentially, instead, use EventTarget, and emit events for each of the callbacks we have in the `delegate` object. This gives us a lot more flexibility with handling these lifecycle steps.

Contributor guide

Open the contributing guide

Research direction

Start by reading the StableSocket implementation and the delegate callbacks described in the issue. Determine whether extending EventTarget can replace the callback-bag design while preserving the existing lifecycle behavior; the issue is done when that design decision and its required scope are clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
web-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.