From a7b3c537edf83b8415716f930fd3fe518638c4db Mon Sep 17 00:00:00 2001 From: Gubolin Date: Mon, 8 Sep 2014 12:27:01 +0200 Subject: add notification blocks --- threads.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'threads.js') diff --git a/threads.js b/threads.js index 3e50686..7616b88 100644 --- a/threads.js +++ b/threads.js @@ -2189,6 +2189,20 @@ Process.prototype.reportTextSplit = function (string, delimiter) { return new List(str.split(del)); }; +// Process notification operations + +Process.prototype.doNotify = function (title, content) { + // TODO webkitNotification + if (window.plugin) { + if (window.plugin.notification) { + window.plugin.notification.local.add({ + message: content, + title: title + }); + } + } +}; + // Process debugging Process.prototype.alert = function (data) { -- cgit v1.3.1