Skip to content

PresentationRequest.getAvailability() could always return a new Promise #507

@markafoltz

Description

@markafoltz

The steps for getAvailability() have an optimization (?) to return (sometimes) a pre-existing Promise from a previous call to getAvailability().

However this isn't consistent with other specs that always return a new Promise when starting an asynchronous action on another device:

Those are a few examples pulled by skimming other specs, there are likely more.

The Promise-caching also produces some implementation complexity because the browser must sometimes store the Promise like a property of the request, and sometimes allocate a new object and pass it directly to script.

It would be simpler to implement, and more consistent with other specs, to always return a new Promise here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions