Re: [mediacapture-region] What should the spec say about elements like HTMLAudioElement? (#51)

I think we should follow precedence set by [element.requestFullscreen()](https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen). I see strong parallels between that API and [cropTo](https://w3c.github.io/mediacapture-region/#dom-browsercapturemediastreamtrack-cropto): both APIs let a single element take over an entire viewport.

Here's what [element.requestFullscreen()](https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen) requires of [this](https://webidl.spec.whatwg.org/#this) to not reject:
- [This](https://webidl.spec.whatwg.org/#this)’s [namespace](https://dom.spec.whatwg.org/#concept-element-namespace) is the [HTML namespace](https://infra.spec.whatwg.org/#html-namespace) or [this](https://webidl.spec.whatwg.org/#this) is an [SVG svg](https://www.w3.org/TR/SVG11/struct.html#SVGElement) or [MathML math](https://www.w3.org/Math/draft-spec/chapter2.html#interf.toplevel) element.
- [This](https://webidl.spec.whatwg.org/#this) is not a [dialog](https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element) element.
- The [fullscreen element ready check](https://fullscreen.spec.whatwg.org/#fullscreen-element-ready-check) for [this](https://webidl.spec.whatwg.org/#this) returns true.
  - element is [connected](https://dom.spec.whatwg.org/#connected).
  - element’s [node document](https://dom.spec.whatwg.org/#concept-node-document) is [allowed to use](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#allowed-to-use) the "[fullscreen](https://fullscreen.spec.whatwg.org/#fullscreen-feature)" feature.

Type-wise this would suggest we should reject on [dialog](https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element) element, and non-HTML non-SVG non-MathML elements, and nothing else.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-region/issues/51#issuecomment-1139784092 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 27 May 2022 16:38:18 UTC