openpgpjs / openpgpjs/web-stream-tools
addEventListener support for Reader
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 35
- Forks
- 15
- Avg merge
- 1h 23m
- Merged PRs (30d)
- 1
Description
Couldn't the reader returned by getReader() implement the FileReader interface or is there another way to "track" reader progress outside a while loop?
var { message } = await openpgp.encrypt({
message: openpgp.message.fromBinary((new File([], "foo.txt")).stream()),
publicKeys: [KEYS],
armor: false
}),
_reader = openpgp.stream.getReader(message.packets.write());
_reader.addEventListener('progress', event => console.log(`${event.type}: ${event.loaded} bytes transferred`));
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.
Research direction
Start at the getReader entry point used by openpgp.stream.getReader(message.packets.write()) and compare the requested addEventListener('progress') behavior with the FileReader interface. Determine what progress information the reader can expose and define completion by demonstrating progress tracking outside the while loop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100