It's slightly unfortunate that after reading this I went to https://developer.mozilla.org/en-US/docs/Web/API/notificatio... to read up about them, and immediately got an unsolicited "allow notifications?" prompt.
However, it does execute code samples on the page.
That page has a code sample for requesting permissions.