Comments (17)
@binarykitchen it's the NotAllowedError
. It's used in multiple specs. It's generally related to users refusing to give permission to use a particular API. Think you want to look for APIs that require user permission and see where you're not catching errors (rejected promises?) properly.
from webidl.
Here's where it's used in Mozilla src code: http://searchfox.org/mozilla-central/search?q=notallowederror.
from webidl.
The Push API defines a PermissionDeniedError
that'd we also like to use in background sync. Could we perhaps adopt that one in WebIDL?
https://w3c.github.io/push-api/#dfn-permissiondeniederror
/cc @nicolassatragno @jkarlin
from webidl.
Note BackgroundSync defines it too.
from webidl.
The user agent is an agent of the user, is that not sufficient? If a web page could know for certain that the user is the obstacle, then it could pester the user.
from webidl.
I think you're reading the description in an overly narrow way. Using NotAllowedError
seems perfectly fine to me.
from webidl.
Yes. Given how many editors are rolling their own PermissionDeniedError
, paving the cow-path might be the right thing to do, though.
from webidl.
I'd prefer to fix this problem by improving the description. Having more error codes that mean almost the same thing is bad for the platform.
The reason for my original formulation is that 1) I don't know what the WebIDL authors intended about users, and 2) I don't want to dictate which way they choose to fix this. The important thing is that it gets fixed.
from webidl.
Using NotAllowedError
sgtm. We might want to update the description if it is considered not good enough.
from webidl.
hello guys, i just landed here from a google search and would like to know where i can look up what the error message "The request is not allowed by the user agent or the platform in the current context." really means.
for my www.videomail.io app i am trying to rephrase it so that it becomes more human friendly to read.
from webidl.
@binarykitchen: that's going to be context dependant. But probably something to do with the user refusing to give permission to access an API.
from webidl.
@tobie thanks - if this is w3c specified, can i know the link?
i really need to know, not "probably" :) this because traffic is high on that site and such an unclear error message can impact usability ...
from webidl.
@tobie i've been investigating. there have been Error objects with the name PERMISSION_DENIED
in the past. do they mean the same?
from webidl.
They were specific to geolocation.
from webidl.
geolocation? huh, i cannot follow ...
from webidl.
See: https://dev.w3.org/geo/api/spec-source.html#position_error_interface
from webidl.
ah, weird, that's something totally different. alright, i ll ignore that for now then. thanks for the links @tobie
from webidl.
Related Issues (20)
- Language-independent definition of interfaces should mention how to create instances HOT 5
- Meta: npm warnings HOT 1
- Definition name uniqueness requirement omits mixins
- Suggestion: forbid ECMA-262/402-defined global names for some named constructs HOT 2
- Nullable ObservableArray attributes are not supported HOT 1
- Make ObservableArray "subclassable" HOT 3
- Definition of {} is slightly ambiguous HOT 2
- Named properties object [[GetOwnProperty]] conflicts with class string HOT 1
- Add `toggle()` and `replace()` methods to `setlike` HOT 1
- Allowing throwing an exception with a specific message HOT 5
- Offer [[ArrayBufferDetachKey]] abstraction?
- Truncation in "convert a Web IDL arguments list to an ECMAScript arguments list" seems (potentially) incorrect
- Dictionary with required members as optional argument HOT 4
- "byte length of a buffer source type" needs updating for resizable and detached buffers HOT 9
- Intent to use BigInt/numeric union in WebNN HOT 6
- CreateMethodProperty removed from Ecma262 HOT 1
- Disallow FrozenArray<> in argument lists, and maybe dictionaries and return types HOT 4
- Declaration of dictionaries with dynamic keys identified by type, but not by name HOT 6
- Should [SameObject] be allowed with FrozenArray<T>? HOT 5
- Declaration of dictionaries with dynamic keys identified by type, but not by name HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webidl.