This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In the DOMError error code list, the WebRTC working group would like to have added. Name: PermissionDeniedError Description: User or security policy denied the request The main use case is to return this error when an user does not grant permission to access his camera. No error code is needed. Specification link: http://dev.w3.org/2011/webrtc/editor/getusermedia.html#attributes-4
IDL needs to take care of the exception story for the web. Reassigning relevant bugs.
Bumping this since this issue was raised in the context of the Push API. When a user explicitly denies push permission when an application calls register(), we'd like to reject with PermissionDeniedError.
Nikhil, just go for it. The name for the DOMException can be added to IDL later. Make sure you indicate it's a DOMException.
Is there a theory for when "later" is in the sentence "can be added to IDL later"? This has been hanging around for 8 months now, and I've seen no action from the assignee on it.
IDL is not a project with proper staffing.
(In reply to Harald Alvestrand from comment #0) > In the DOMError error code list, the WebRTC working group would like to have > added. You should not use DOMError for anything. See red note: http://dom.spec.whatwg.org/#interface-domerror > Name: PermissionDeniedError > Description: User or security policy denied the request > > The main use case is to return this error when an user does not grant > permission to access his camera. > > No error code is needed. > > Specification link: > http://dev.w3.org/2011/webrtc/editor/getusermedia.html#attributes-4 This is bug for the DOM spec, no? Not part of WebIDL?
No it is for IDL, see red note: http://dom.spec.whatwg.org/#errors ^_^
(In reply to Anne from comment #7) > No it is for IDL, see red note: http://dom.spec.whatwg.org/#errors ^_^ heh, red note hot potato :)
I'd like to get this specced somwhere. I'm not in favor of monkey patching this in the Push API. If IDL is not staffed, it seems better to add it to DOM than to define it in Push.
Michael, it's not entirely clear to me the user refusing permission is an error (see recent discussion on WHATWG list), but ignoring that the best way forward is to simply use DOMException and mint a new name if the names from http://heycam.github.io/webidl/#idl-DOMException-error-names are not satisfactory. I'm sure it will be added at some point. It will no longer be added to DOM, as IDL recently took over the definition of DOMException. Too low-level for DOM now to touch.
Hi Anne, I did see the whatwg discussion on permission requests and promises. The Push API does not have a method for explicitly requesting permissions. Check the spec for details, I think promise rejection when permission is denied is appropriate for the current API design. Fulfilling the promise for the register method successfully requires a PushRegistration which would not exist if permission was rejected. How can we proceed on getting PermissionDeniedError in WebIDL then? Should I ping Cameron or are there other editors for WebIDL that can do this?
Just leave this bug open and start using the new name. It's just a registry after all.
Ping! It looks to me like PermissionDeniedError is the union of SecurityError and NotAllowedError [1] so how should spec editors pick going forward? [1] https://github.com/heycam/webidl/pull/85
Closing this to match https://github.com/heycam/webidl/issues/95.