Search completed in 1.48 seconds.
8 results for "PermissionDescriptor":
XRPermissionDescriptor - Web APIs
to that end, the xr
permissiondescriptor dictionary is used to describe the webxr features the app needs to use, as well as those features it would like ot use if permision is granted.
... the xr
permissiondescriptor's name must be set to xr in order to direct the permissions api to correctly handle the request as applying to webxr.
... properties in addition to inheriting the properties of the parent interface,
permissiondescriptor, xr
permissiondescriptor provides the following properties.
...{state}) => { switch(state) { case "granted": setupxr(); break; case "prompt": promptandsetupxr(); break; default: /* do nothing otherwise */ break; } .catch(err) { console.log(err); } } else { setupxr(); } specifications specification status comment webxr device apithe definition of 'xr
permissiondescriptor' in that specification.
XRPermissionDescriptor.mode - Web APIs
the mode property of the xr
permissiondescriptor dictionary is a string taken from the xrsessionmode enumerated type, specifying which web xr session mode (inline, immersive-vr, or immersive-ar) the described permissions will be used for.
... syntax xr
permissiondescriptor = { mode: xrsessionmode, requiredfeatures: reqfeaturelist, optionalfeatures: optfeaturelist }; xr
permissiondescriptor.mode = xrsessionmode; xrmode = xr
permissiondescriptor.mode; value a domstring whose value is one of the strings found in the xrsessionmode enumerated type: immersive-ar the session's output will be given exclusive access to the immersive device, but the rendered content will be blended with the real-world environment.
...{state}) => { switch(state) { case "granted": setupxr(); break; case "prompt": promptandsetupxr(); break; default: /* do nothing otherwise */ break; } .catch(err) { console.log(err); } } else { setupxr(); } specifications specification status comment webxr device apithe definition of 'xr
permissiondescriptor.mode' in that specification.
XRPermissionDescriptor.optionalFeatures - Web APIs
the xr
permissiondescriptor dictionary's optionalfeatures property is used to specify a list of webxr features which your app or site would like to use but can operate without if permission isn't granted to use them.
... syntax xr
permissiondescriptor = { mode: xrsessionmode, requiredfeatures: reqfeaturelist, optionalfeatures: optfeaturelist }; xr
permissiondescriptor.optionalfeatures = optfeaturelist; optfeaturelist = xr
permissiondescriptor.optionalfeatures; value an array of strings taken from the xrreferencespacetype enumerated type, indicating set of features that your app would like to use, but can operate without if permission to use them isn't available.
...{state}) => { switch(state) { case "granted": setupxr(); break; case "prompt": promptandsetupxr(); break; default: /* do nothing otherwise */ break; } .catch(err) { console.log(err); } } else { setupxr(); } specifications specification status comment webxr device apithe definition of 'xr
permissiondescriptor.optionalfeatures' in that specification.
XRPermissionDescriptor.requiredFeatures - Web APIs
the xr
permissiondescriptor dictionary's requiredfeatures property should be set prior to calling navigator.permissions.query() to a list of webxr features which must be supported for the app to work.
... syntax xr
permissiondescriptor = { mode: xrsessionmode, requiredfeatures: reqfeaturelist, optionalfeatures: optfeaturelist }; xr
permissiondescriptor.requiredfeatures = reqfeaturelist; reqfeaturelist = xr
permissiondescriptor.requiredfeatures; value an array of strings indicating the webxr features which must be available for use by the app or site.
...{state}) => { switch(state) { case "granted": setupxr(); break; case "prompt": promptandsetupxr(); break; default: /* do nothing otherwise */ break; } .catch(err) { console.log(err); } } else { setupxr(); } specifications specification status comment webxr device apithe definition of 'xr
permissiondescriptor.requiredfeatures' in that specification.
Permissions.query() - Web APIs
syntax navigator.permissions.query(
permissiondescriptor).then(function(permissionstatus) { ...
... }) parameters
permissiondescriptor an object that sets options for the query operation consisting of a comma-separated list of name-value pairs.
... exceptions exception explanation typeerror retrieving the
permissiondescriptor information failed in some way, or the permission doesn't exist or is currently unsupported (e.g.
Using the Permissions API - Web APIs
entposition(revealposition,positiondenied,geosettings); } else if (result.state == 'denied') { report(result.state); geobtn.style.display = 'inline'; } result.onchange = function() { report(result.state); } }); } function report(state) { console.log('permission ' + state); } handlepermission(); permission descriptors the permissions.query() method takes a
permissiondescriptor dictionary as a parameter — this contains the name of the api you are interested in.
... some apis have more complex
permissiondescriptors containing additional information, which inherit from the default
permissiondescriptor.
... for example, the push
permissiondescriptor should also contain a boolean that specifies if uservisibleonly is true or false.
Permissions.revoke() - Web APIs
var revokepromise = navigator.permissions.revoke(descriptor); parameters descriptor an object based on the
permissiondescriptor dictionary that sets options for the operation consisting of a comma-separated list of name-value pairs.
... exceptions typeerror retrieving the
permissiondescriptor information failed in some way, or the permission doesn't exist or is currently unsupported (e.g.
Web APIs
xmldocument xmlhttprequest xmlhttprequesteventtarget xmlhttprequestresponsetype xmlserializer xpathevaluator xpathexception xpathexpression xpathnsresolver xpathresult xrboundedreferencespace xrenvironmentblendmode xreye xrframe xrframerequestcallback xrhandedness xrinputsource xrinputsourcearray xrinputsourceevent xrinputsourceeventinit xrinputsourceschangeevent xrinputsourceschangeeventinit xr
permissiondescriptor xrpermissionstatus xrpose xrreferencespace xrreferencespaceevent xrreferencespaceeventinit xrreferencespacetype xrrenderstate xrrenderstateinit xrrigidtransform xrsession xrsessionevent xrsessioneventinit xrsessioninit xrsessionmode xrspace xrsystem xrtargetraymode xrview xrviewerpose xrviewport xrvisibilitystate xrwebgllayer xrwebgllayerinit xsltprocessor ...