Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start with usage examples #11

Closed
jzaefferer opened this issue Oct 16, 2014 · 4 comments
Closed

Start with usage examples #11

jzaefferer opened this issue Oct 16, 2014 · 4 comments

Comments

@jzaefferer
Copy link

The spec currently has three examples under "5 Fetch API", using ES6 syntax. Since the document is pretty long, it would help a lot to have some usage examples at the start of the spec, for example as part of the "Goals" section, similar to the examples in the Web Audio spec. I also suggest using at most ES5 syntax for those examples.

What would those examples accomplish? A lot of specs, including this one, are mostly written for implementers. Getting early feedback from users is generally desirable, but often hindered by the lack of usage examples. Adding those, or in this case, making them easier to find, would make the spec a lot more accessible.

@annevk
Copy link
Member

annevk commented Oct 16, 2014

I think having examples that push the boundaries a bit is fine. After all, ES6 syntax is already shipping, fetch() is not.

As for the placement of the examples. They are in the API section because the rest of the specification deals with something much larger. The fetching infrastructure for the entire platform.

I would be open to having an introduction section that explains the fetching infrastructure and includes examples (including <img crossorigin>, background-image, new Worker() etc.) though. Interested in writing that?

@jzaefferer
Copy link
Author

an introduction that explains the fetching infrastructure and includes examples

That sounds very useful. I was coming from github's fetch polyfill and wasn't aware of the actual focus of the spec.

Interested in writing that?

Personally, no, but I'll ask people on the jQuery team about that.

@shospodarets
Copy link

I have provided some useful examples in my article: http://blog.gospodarets.com/fetch_in_action/
using ES5 syntax.
I can write some examples based on it (if somebody suggests which would be the best) or anyone else can use them.

@annevk annevk closed this as completed in 8bd9f55 Jul 5, 2015
@jzaefferer
Copy link
Author

Nice!

yutakahirano added a commit that referenced this issue Jun 23, 2020
# This is the 1st commit message:

# This is a combination of 23 commits.
# This is the 1st commit message:

Integrate CORP and COEP

This is part of the introduction of COEP
(whatwg/html#5454). The CORP check now takes
COEP into account. Also, responses coming from service workers
are checked.

# This is the commit message #2:

Update fetch.bs

Co-authored-by: Domenic Denicola <d@domenic.me>
# This is the commit message #3:

Update fetch.bs

Co-authored-by: Domenic Denicola <d@domenic.me>
# This is the commit message #4:

fix

# This is the commit message #5:

fix

# This is the commit message #6:

fix

# This is the commit message #7:

fix

# This is the commit message #8:

fix

# This is the commit message #9:

fix

# This is the commit message #10:

fix

# This is the commit message #11:

fix

# This is the commit message #12:

fix

# This is the commit message #13:

fix

# This is the commit message #14:

fix

# This is the commit message #15:

fix

# This is the commit message #16:

fix

# This is the commit message #17:

fix

# This is the commit message #18:

Update fetch.bs

Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
# This is the commit message #19:

Update fetch.bs

Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
# This is the commit message #20:

fix

# This is the commit message #21:

fix

# This is the commit message #22:

fix

# This is the commit message #23:

fix

# This is the commit message #2:

fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants