Fixes Edge. Yep.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3213 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2016-04-21 10:13:28 +00:00
parent 8a1085d5a3
commit b65b7b5d67

View File

@ -130,7 +130,9 @@ function receive(data) {
send({event: "hashChange", hash: window.location.hash}); send({event: "hashChange", hash: window.location.hash});
} }
} else if (line && line[0] && line[0].action == "notify") { } else if (line && line[0] && line[0].action == "notify") {
new Notification(line[0].title, line[0].options); if (window.Notification) {
new Notification(line[0].title, line[0].options);
}
} else if (line && line[0] && line[0].action == "title") { } else if (line && line[0] && line[0].action == "title") {
window.document.title = line[0].value; window.document.title = line[0].value;
} else if (line && line[0] && line[0].action == "prompt") { } else if (line && line[0] && line[0].action == "prompt") {
@ -413,7 +415,7 @@ function onMessage(event) {
var gSocket; var gSocket;
window.addEventListener("load", function() { window.addEventListener("load", function() {
if (Notification) { if (window.Notification) {
Notification.requestPermission(); Notification.requestPermission();
} }
var input = document.getElementById("input"); var input = document.getElementById("input");