Re: [mediacapture-region] What makes CropTarget special to require an asynchronous creation? (#17)

Gentlemen, I have a simple proposal.
  Promise<void> cropTo(Element);
  Promise<void> cropTo(CropTarget);

1. Same document:
  // Note that *only* cropTo() is async here, which is
  // within consensus.
  await track.cropTo(document.getElementById('id'));

2. Multiple documents:
  function totallySyncFunction() {
    setTimeout(async () => {
      await getCropTargetAndSendItToCapturer(element);
    }, 0);

  async function getCropTargetAndSendItToCapturer(element) {
    await CropTarget.fromElement(element);

Note that, because **receiving** the message is asynchronous, the receiver would not observe a difference. This seems completely palatable for a generally synchronous sender.


GitHub Notification of comment by eladalon1983
Please view or discuss this issue at using your GitHub account

Sent via github-notify-ml as configured in

Received on Friday, 20 May 2022 10:33:26 UTC