You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Three unclear behavior found while implementing the |getAvailability| algorithm:
In step 6, the same availability object is returned if an existed (A, presentationUrls) tuple is found. However, we can only return the same object if the requester is in the same DOM window.
in step 9, we should run the device monitoring algorithm in parallel so that we can resolve the promise as early as possible.
For consecutive |getAvailability| on the same PresentationRequest object, we should guarantee the resolve order in the algorithm. For example,
PROPOSED RESOLUTION: For #335, check algorithms around availability objects and make sure they all refer to "script object" or "internal object". For bullet 2, add "in parallel" in step 9. For bullet 3, make sure getAvailability returns the same Promise object.
Section 6.4 will need a bit of cleanup to make it consistent with reasonable behavior. Here is what I am thinking.
Annotate getAvailability() with SameObject.
Define a presentation availability internal object for use in the algorithms. There is exactly one of these for a given list of URLs regardless of the script context.
Define a presentation availability promise which is created at most once per presentation availability.
Make sure that only one PresentationAvailability is created per script context per presentation availability. (This is an optimization, may not be strictly required.)
Update conditions when an entry can be removed from the set of availability objects.
Can start after the PR for Issue #342 lands (which tweaks some text in this same section).
Three unclear behavior found while implementing the |getAvailability| algorithm:
(A, presentationUrls)
tuple is found. However, we can only return the same object if the requester is in the same DOM window.PresentationRequest
object, we should guarantee the resolve order in the algorithm. For example,should always print "12" in console for all browsers.
The text was updated successfully, but these errors were encountered: