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

Use fetch events in parsers for events that are not related to parsing and are related to getting the content of the file #960

Closed
alrra opened this issue Apr 2, 2018 · 1 comment

Comments

@alrra
Copy link
Contributor

alrra commented Apr 2, 2018

Parsers currently have custom parse events for some actions that can be covered by fetch events.

For example instead of events like parse::<something>::error::not-found or parse::<something>::error::not-specified, we can just have fetch::missing::<something>.

In general I think the following events should cover most cases.

  • fetch::end::<resource-type>
  • fetch::error::<resource-type>
  • fetch::missing::<resource-type>
  • fetch::start::<resource-type>

I think having this (or adding these events in parsers) will not only reduce the need to introduce new custom events, and thus, new types, but also make more rules possible and easier to implement.

Also, in some cases as with the web app manifest, it will make things backward compatible with what we have right now


See also: #930

@alrra
Copy link
Contributor Author

alrra commented Apr 11, 2018

This is now fixed.

@alrra alrra closed this as completed Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant