-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lock vs LockInfo #42
Comments
LockInfo is a dictionary because it's a pure information dump. Lock is an interface because I imagine adding more capabilities in the future, e.g. event for when it is released, waitUntil, etc. I agree there's no reason to have Lock be an interface now, but it's hard to change later. |
Makes sense. Any reason clientId shouldn't also be on the Lock object. |
It's not really beneficial now since any given script is going to get locks corresponding to its own context. If we expose the environment id as e.g. |
I guess the issue is that today the current clientId is not easily accessible by pages. Ideally we'd like the entire Clients API to be accessible from any page and also expose the current page client id. |
Can you comment on whatwg/html#3378 perchance? Specifically, data that "... clientId is becoming the defacto standard page identifier ..." would help us prioritize getting it exposed everywhere. |
Per offline discussion, we should push on exposing it globally rather than having web apps "abuse" locks to determine the page's id. |
According to the spec the request() method returns a Lock object, while the query() method returns LockInfo objects. The only difference is the clientId field.
https://inexorabletash.github.io/web-locks/#api-lock-manager
Is there are reason why we have this differentiation?
The text was updated successfully, but these errors were encountered: