Skip to content

billstclair/elm-system-notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elm-package

billstclair/elm-system-notification is an Elm interface to the Notifications API. It allows your application to request permission to create system notifications, and, if granted, create them.

Notifications don't work from localhost in Chrome, so don't be surprised if you don't see them when running from elm reactor.

See the "example" directory for a simple use case.

In order to use it, your top-level program needs to have a port with which to communicate with the JavaScript code:

port notify : NotifyPort

You need to compile your program to a site directory:

elm make Main.elm --output site/index.js

And you need a top-level HTML file similar to site/index.html.

Bill St. Clair
12 July 2018