Make a way to send and receive events
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
Research direction
Start by locating IframeSyncClient and reading the existing state-synchronization path. Determine how messages are transported and represented, then define dispatchEvent, addEventListener, and removeEventListener around that mechanism; done means named events can carry JSON-serializable objects between iframes without implying native Event support.
Written by the indexing model from the issue text.
Description
In addition to just keeping state synchronized, it was also be useful in some cases to be able to broadcast events of a more ephemeral nature. State should be used in most cases, and especially if late-joining clients need to be given the full state, but imagining a case where one iframe wants to record actions taken in another during a "record" mode, having those transmitted as evens would be useful.
The idea is to add methods to IframeSyncClient:
dispatchEventfor sending eventsaddEventListenerfor subscribing to eventsremoveEventListenerfor unsubscribing to events, you'll have to pass in the function previously sent in
I think we would specify an event name and object as 2 parameters. Also, native Event objects aren't going to be JSON serializable, so we shouldn't indicate or imply in the code or the demo that that is how this should be used.
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mieweb/iframe-sync
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
mieweb/iframe-sync#3 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
mieweb/iframe-sync#1 ·
All issues in mieweb/iframe-sync
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·