growl-js
v1.0.22
Published
A classy notification system for the browser
Downloads
28
Maintainers
Readme
- Download & copy this package's "dist" folder into your web server's public folder eg.
public/js/dist/*. - Rename "dist" to "growl" eg.
public/js/growl - Load the growl script at the end of your web page (before the closing
bodytag) like this:
<body>
...
<script src="/js/growl/growl.js"></script>
</body>
</html>
- When the browser loads growl will be attached to the browser's global window object. Use it anywhere in your scripts like this:
<button>Target</button>
<script>
document.querySelector('button').onclick = function(event) {
growl({ message: 'You clicked on me' target: event.target });
});
</script>Then import and use it in your project's ES6 modules:
function helloWorld() { growl({ message: 'Hello World' }); }
Growl-js supports npm under the name growl-js.
Manual release steps
- Ananda Masri
- And awesome contributors
