ra" and "microphone" are not yet implemented. if (["camera", "microphone"].includes(permissionName)) { throw new lazy.error.UnsupportedOperationError( `"descriptor.name" "${permissionName}" is currently unsupported` ); } }; /** * Validate the permission state. * * @param {PermissionState} state * The state of the permission which will be validated. * * @throws {InvalidArgumentError} * Raised if an argument is of an invalid type or value. */ permissions.validateState = function (state) { const permissionStateTypes = Object.keys(PermissionState); lazy.assert.that( state => permissionStateTypes.includes(state), lazy.pprint`Expected "state" to be one of ${permissionStateTypes}, got ${state}` )(state); }; PK