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

[css-masking-1] Fetch doesn't define "potentially CORS-enabled fetch" #358

Open
foolip opened this issue Jul 19, 2019 · 6 comments
Open

Comments

@foolip
Copy link
Member

foolip commented Jul 19, 2019

https://drafts.fxtf.org/css-masking/#priv-sec says:

User agents must use the potentially CORS-enabled fetch method defined by the [FETCH] specification for all <mask-source>, <clip-source> and <image> values on the mask-image, mask-border-source and clip-path properties. When fetching, user agents must use “Anonymous” mode, set the referrer source to the stylesheet’s URL and set the origin to the URL of the containing document. If this results in network errors, the effect is as if the value none had been specified.

However, Fetch doesn't define "potentially CORS-enabled fetch" and mentions it only in https://fetch.spec.whatwg.org/#goals as having once been in HTML.

Perhaps @annevk can suggest what to say instead.

@foolip
Copy link
Member Author

foolip commented Jul 19, 2019

@svgeesus
Copy link
Contributor

svgeesus commented Aug 5, 2019

This affects several other CSS specs as well. @annevk What term should be linked to, nowadays, to express this concept?

@annevk
Copy link
Member

annevk commented Aug 6, 2019

You probably want to do something similar to https://html.spec.whatwg.org/#create-a-potential-cors-request. In particular, you want to invoke https://fetch.spec.whatwg.org/#concept-fetch with a https://fetch.spec.whatwg.org/#concept-request with the appropriate bits set.

@svgeesus
Copy link
Contributor

svgeesus commented Aug 8, 2019

Thanks, @annevk !

@svgeesus
Copy link
Contributor

svgeesus commented Aug 2, 2021

Related issue w3c/csswg-drafts#6076 (on Fonts, but the same issue)

@noamr
Copy link

noamr commented Oct 6, 2021

See w3c/csswg-drafts#6715

The "Potentially CORS request" algorithm is specifically to deal with crossorigin attributes etc. In this PR I do something similar for CSS resources (which don't have those HTML attributes).

It's not yet integrated with masking.

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

5 participants