Re: [mediacapture-region] Should generation of CropTarget from elements be able to fail? (#48)

> Do we have such case? I would hope not.

Sorry, I don't understand this question. What is it attached to?

> In Chrome's case, my understanding is that the WebIDL might accept HTMLElement and not Element, this is fine and is handled by WebIDL just fine.

I think you're recalling a [different discussion](https://github.com/w3c/mediacapture-region/issues/13) here which is not, IMHO, relevant to the current discussion. Chrome has never implemented HTMLElement OR Element. Chrome has so far only implemented cropping to HTMLDivElement and HTMLIFrameElement.

Implementing cropping to a given set of related Element subclasses, and **ensuring it works correctly**, is significant work. This work must precede updating the IDL files. We cannot expose untested functionality to unsuspecting Web applications.

Assume we invest this work in all current elements right out of the gate. Great. Now what happens when a new element type is introduced?

It is best if we allow gradual rolling out of features. Web developers clamoring to crop to a DIV now, should not be forced to wait until we implement HTMLSuperObscureElement. They'll do just fine wrapping their obscure element inside of HTMLDivElement or a similar work-around.

> In our case, failing a CropTarget is due to a UA optimisation to reduce latency.

In this particular thread (#48), we're also discussing failure due to incomplete implementation. (This particular type of failure ~can~ should be synchronous.)

> We usually try to avoid designs that allow observing GC.

Chrome might implement as only freeing up tokens when the (sub-)document is navigated, and not when things are garbaged-collected. At any rate, this is not part of the specification.

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


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

Received on Monday, 23 May 2022 09:04:32 UTC