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

Update fetchpriority to match final spec #24520

Closed
wants to merge 0 commits into from
Closed

Conversation

pmeenan
Copy link
Contributor

@pmeenan pmeenan commented Feb 17, 2023

Description

This updates the fetchpriority HTML attribute and priority fetch option to match the final spec.

Motivation

The Priority Hints spec was merged into the HTML and fetch specs, obsoleting the original spec.

Additional details

Here is the HTML spec PR and the Fetch spec PR.

Summarized changes:

  • The iFrame element no longer supports the fetchPriority attribute (was never implemented anywhere).
  • The img, link and script elements point to the appropriate HTML spec pages.
  • The priority option as part of creating a fetch request was updated.
  • A stray reference to the old importance attribute was updated.

One thing that I couldn't quite make out is that the Fetch spec accounts for a Request object but also a RequestInit object that is used when constructing a request. The priority is not readable from Request, it is only settable at construct time. I removed it from the JSON and Request interfaces and added it to the main fetch page where it talks about constructor options but the RequestInit itself doesn't appear to be directly documented.

Related issues and pull requests

Fixes #24519

@pmeenan pmeenan requested review from a team as code owners February 17, 2023 20:37
@pmeenan pmeenan requested review from sideshowbarker, schalkneethling and bsmth and removed request for a team February 17, 2023 20:37
@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs Content:Learn Learning area docs Content:WebAPI Web API docs labels Feb 17, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2023

Preview URLs (9 pages)
Flaws (12)

Note! 6 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/Request/Request
Title: Request()
Flaw count: 1

  • broken_links:
    • Can't resolve /en-US/docs/Web/API/abortsignal

URL: /en-US/docs/Web/API/HTMLLinkElement
Title: HTMLLinkElement
Flaw count: 10

  • macros:
    • /en-US/docs/Web/API/HTMLLinkElement/crossOrigin does not exist
    • /en-US/docs/Web/API/HTMLLinkElement/disabled does not exist
    • /en-US/docs/Web/API/HTMLLinkElement/href does not exist
    • /en-US/docs/Web/API/HTMLLinkElement/hreflang does not exist
    • /en-US/docs/Web/API/HTMLLinkElement/media does not exist
    • and 5 more flaws omitted

URL: /en-US/docs/Web/HTML/Element/iframe
Title: <iframe>: The Inline Frame element
Flaw count: 1

  • broken_links:
    • Can't resolve /en-US/docs/Learn/Common_questions/What_is_a_URL
External URLs (2)

URL: /en-US/docs/Web/HTML/Element/iframe
Title: <iframe>: The Inline Frame element

(comment last updated: 2023-02-18 15:28:43)

@wbamberg
Copy link
Collaborator

Thanks for this update, @pmeenan !

One thing that I couldn't quite make out is that the Fetch spec accounts for a Request object but also a RequestInit object that is used when constructing a request. The priority is not readable from Request, it is only settable at construct time. I removed it from the JSON and Request interfaces and added it to the main fetch page where it talks about constructor options but the RequestInit itself doesn't appear to be directly documented.

Yes, on MDN we usually don't document dictionaries like this as standalone objects/pages. We just document them inline in the place they are used, so here it looks like we should update the options parameter to the Request() constructor: https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options .

@pmeenan
Copy link
Contributor Author

pmeenan commented Feb 18, 2023

@wbamberg Thanks. I updated the Request() page so the options include the same priority change that was added to the fetch page.

I also put the experimental flag back since neither WebKit nor Gecko's implementations have made it to a stable browser yet. I'll submit another PR once that happens to include the version info and remove the flag.

@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

1 similar comment
@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added rebase needed 🚧 Content:Other Any docs not covered by another "Content:" label and removed Content:HTML Hypertext Markup Language docs labels Feb 19, 2023
@pmeenan pmeenan closed this Feb 19, 2023
@github-actions github-actions bot removed Content:WebAPI Web API docs Content:Other Any docs not covered by another "Content:" label Content:Learn Learning area docs labels Feb 19, 2023
@pmeenan
Copy link
Contributor Author

pmeenan commented Feb 19, 2023

Sorry, rebase went horribly wrong - will submit a new, clean PR

@pmeenan
Copy link
Contributor Author

pmeenan commented Feb 19, 2023

Clean PR created: #24595

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

Successfully merging this pull request may close these issues.

Move fetchpriority references to HTML and fetch specs
2 participants