diff --git a/README.md b/README.md index c79788c..362ac24 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,13 @@ -### External links: +# COEP reflection + +## Authors: +- Arthur Sonzogni + +## Participate +This is a minor proposal. You are encouraged to discuss directly in the +[original HTML feature proposal](https://github.com/whatwg/html/issues/7912) + +## External links: - [Demo](https://coep-reflection.glitch.me/) - [HTML original discussion](https://github.com/whatwg/html/issues/7912) - [HTML specification PR](https://github.com/whatwg/html/pull/7948) @@ -7,38 +16,58 @@ - [Chrome status](https://chromestatus.com/feature/5074103873568768) - [Mozilla: request for position](https://github.com/mozilla/standards-positions/issues/645): ["it should be fine from our side"](https://github.com/mozilla/standards-positions/issues/645#issuecomment-1160546542). - [Webkit: request for position](https://lists.webkit.org/pipermail/webkit-dev/2022-May/032258.html): ["Seems reasonnable"](https://lists.webkit.org/pipermail/webkit-dev/2022-June/032259.html). -### Description + +## Description Add the API: ```js -self.crossOriginEmbedderPolicy; +window.crossOriginEmbedderPolicy; ``` It reflects the environment's [cross-origin-embedder-policy](https://html.spec.whatwg.org/multipage/origin.html#coep)'s value. The possibles values are: `unsafe-none`, `credentialless`, and `require-corp`. -### Security/Privacy -It is already possible to deduce the value returned by the API, by making a -no-cors `fetch` request toward a known cross-origin URL whose response depends -on the request's cookies and omit the CORP headers. +The API exposed to window and workers. -It is costly, but theoretically polyfillable. As such, it should be a -security/privacy no-op. +## Motivating use cases. + +Depending on the Cross-Origin-Embedder-Policy (COEP) value, not every +iframe/subresources can be loaded inside the document. + +For instance: +- If the document uses COEP, then its `