I'm working with a desktop notification. I'm using this code to show it, and its working fine:
// If the user is okay, let's create a notification
if (permission === "granted") {
var options = {
body: "This is the body of the notification",
icon: "icon.jpg",
dir : "ltr"
};
var notification = new Notification("Hi there",options);
}
But how can I fetch data from a text file into options.body
?