whatwg / xhr

XMLHttpRequest Standard
https://xhr.spec.whatwg.org/
Other
314 stars 131 forks source link

Expose ProgressEvent to ServiceWorker #305

Closed saschanaz closed 3 years ago

saschanaz commented 3 years ago

FileReader is exposed to ServiceWorker and uses ProgressEvent, but the event interface is not exposed to ServiceWorker since 9d0a9bb85c32e10788227a79943362bede178a7c.

Exposing it to ServiceWorker also matches Gecko and WebKit implementation:

annevk commented 3 years ago

I guess it's too late to stop doing that?

@asutherland @mkruisselbrink @jakearchibald

mkruisselbrink commented 3 years ago

"that" being exposing FileReader to service workers? Now all major browsers have implemented Blob.stream/text/arrayBuffer there at least is an alternative to FileReader (other than wrapping a Blob in a Response). My gut feeling is that actually removing FileReader from service workers would be challenging though.

annevk commented 3 years ago

Yeah, removing FileReader. If it's too late I support doing this.

Rashika101 commented 3 years ago

Hey!! Are you willing to accept new contributors? I am interested into contributing to this repository so, if you could explain a bit more this feature request, it would be great. Thanks

saschanaz commented 3 years ago

https://github.com/whatwg/xhr/blob/b7726ee896c3e033f036d5daa8ee0373049e34c2/xhr.bs#L1764-L1765

Currently the line 1764 lacks ServiceWorker, so we need to add one. I don't think we need anything other than that 👍

Rashika101 commented 3 years ago

Hey!! I wanna do that will you please assigned this issue to me that will be great .

saschanaz commented 3 years ago

I don't think assigning is used in this repo. Just open a PR and make sure you include Fixes #305 in the description 😉. It will automatically link your PR to this issue.

Rashika101 commented 3 years ago

Thank You @saschanaz but what is fixed in Fixes #305. If You don't mind Could You please explain little deeper.

saschanaz commented 3 years ago

Hmm, I mean when you open a pull request after writing the actual fix, you'll want to include the "Fixes" text to the content body of the post. It's not a requirement but just a recommendation, so if you have no idea please just proceed.

Rashika101 commented 3 years ago

Understood...But no Description box is coming. written -"there isn't nothing to compare" How to do that?

saschanaz commented 3 years ago

You committed the fix and you see that message? Weird, could you share the screenshot?

Rashika101 commented 3 years ago

Can we please start it again? Excuse me!! But I just got confused... How to add a service Worker? I did in my own way...which is not adjusting with the repo. Please teach me a little more..

saschanaz commented 3 years ago

No problem! The easiest way:

  1. Open https://github.com/whatwg/xhr/blob/main/xhr.bs
  2. Click the edit button at the right side (which looks like a pen)
  3. Search interface ProgressEvent and add ,ServiceWorker to the previous line
  4. At the "Propose changes" block, write a title e.g. "Expose ProgressEvent to ServiceWorker"
  5. Click "Propose changes" button.
  6. Cilck "Create pull request"
  7. Type "x" inside [ ] so that it can be [x], for "At least two implementers are interested" part, and replace "..." with "Gecko" and "WebKit". This is based on my observation in https://github.com/whatwg/xhr/issues/305#issue-774789533. (You can skip this.)
  8. Cilck "Create pull request" again
  9. That's it!

I'll happily write steps for GitHub Desktop if you are using it BTW.

Rashika101 commented 3 years ago

@saschanaz Thank You so so much .. I did that.. What next to do?