The query() method of the Permissions interface returns the state of a user permission on the global scope.
query()
MDN Reference