browser API example from https://developer.mozilla.org/en-US/docs/WebAPI/Browser#Example.