
FetchIt
Lightweight component for form handling and submission using Fetch API


This section shows how to integrate the lightweight library Awesome Notifications.
<!-- JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/awesome-notifications@3/dist/index.var.js" defer></script>
<!-- CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/awesome-notifications@3/dist/style.min.css">FetchIt.Message as follows:document.addEventListener('DOMContentLoaded', () => {
const notifier = new AWN();
FetchIt.Message = {
success(message) {
notifier.success(message);
},
error(message) {
notifier.alert(message);
},
}
});defer attribute; then you do not need the DOMContentLoaded handler and have direct access to the FetchIt class:const notifier = new AWN();
FetchIt.Message = {
success(message) {
notifier.success(message);
},
error(message) {
notifier.alert(message);
},
}Done! This is how you integrate Awesome Notifications.