这是indexloc提供的服务,不要输入任何密码
Skip to content

Does window.getScreenDetails() always resolve with the same object? #80

@reillyeon

Description

@reillyeon

As written this seems to be implied by the idea that the Promise is resolved "with this's associated ScreenDetails object" but I don't see any specification text which defines how this object is initialized. I recommend extending the Window interface with an internal slot which holds the Promise returned by this function. Future invocations of getScreenDetails() can return this same Promise which may have already resolved.

This raises a related question about what happens when the "window-placement" permission is revoked. This should probably clear this internal slot (so that the permission check has to be rerun) as well as preventing new events for advanced observable properties from firing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions