Skip to content

Commit

Permalink
Editorial: Update use of WebIDL "invoke a callback function"
Browse files Browse the repository at this point in the history
This algorithm can now handle the need to report an exception thrown by
the callback. Some small tweaks are made for consistency with other
specifications.

Part of whatwg/webidl#1425.
  • Loading branch information
jeremyroman committed Aug 2, 2024
1 parent 581d7d4 commit da665c5
Show file tree
Hide file tree
Showing 2 changed files with 1,349 additions and 687 deletions.
7 changes: 3 additions & 4 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,9 @@ To <dfn>run the video frame request callbacks</dfn> for a {{HTMLVideoElement}} |
1. Set the [=last presented frame identifier=] to |presentedFrames|.
1. Let |callbacks| be the [=list of video frame request callbacks=].
1. Set |video|'s [=list of video frame request callbacks=] to be empty.
1. For each entry in |callbacks|
1. If the entry's [=canceled=] boolean is <code>true</code>, continue to the next entry.
1. [=Invoke=] the callback, passing |now| and |metadata| as arguments
1. If an exception is thrown, [=report the exception=].
1. [=list/For each=] |entry| of |callbacks|:
1. If |entry|'s [=canceled=] boolean is <code>true</code>, continue.
1. [=Invoke=] |entry| with « |now|, |metadata| » and "`report`".

Note: There are **no strict timing guarantees** when it comes to how soon
{{VideoFrameRequestCallback|callbacks}} are run after a new video frame has been presented.
Expand Down
Loading

0 comments on commit da665c5

Please sign in to comment.