You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can't remember if this was raised previously, but was coding something up and found that I had to wrap the API in a try/catch a little bit annoying when a name of a permission might be potentially unknown.
letpermCheck;try{permCheck=awaitnavigator.permissions.query({name: "whatever"});}catch(err){return;// not supported}
I wonder if we can either change the name in the dictionary to allow a DOMString,
constpermCheck=awaitnavigator.permissions.query({name: "whatever"});permCheck.state==="unknown";// or "not-supported"
or adds some kind of "navigator.permissions.supports()" method.
if(!navigator.permissions.supports("whatever")){return;// not supported, oh well. };constpermCheck=awaitnavigator.permissions.query({name: "whatever"});
The text was updated successfully, but these errors were encountered:
Can't remember if this was raised previously, but was coding something up and found that I had to wrap the API in a try/catch a little bit annoying when a name of a permission might be potentially unknown.
I wonder if we can either change the name in the dictionary to allow a DOMString,
or adds some kind of "navigator.permissions.supports()" method.
The text was updated successfully, but these errors were encountered: