forked from mirrors/gecko-dev
MozReview-Commit-ID: LR3OiP0miEm --HG-- extra : rebase_source : 02f7a3d316fd084e71a918caf50d44a7123fc521 extra : amend_source : f4918e853cf0e50a60c151d358de75614b71c52f
39 lines
777 B
HTML
39 lines
777 B
HTML
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<script>
|
|
"use strict";
|
|
|
|
function showNotification1() {
|
|
var options = {
|
|
dir: undefined,
|
|
lang: undefined,
|
|
body: "Test body 1",
|
|
tag: "Test tag",
|
|
icon: undefined,
|
|
};
|
|
var n = new Notification("Test title", options);
|
|
n.addEventListener("click", function(event) {
|
|
event.preventDefault();
|
|
});
|
|
return n;
|
|
}
|
|
|
|
function showNotification2() {
|
|
var options = {
|
|
dir: undefined,
|
|
lang: undefined,
|
|
body: "Test body 2",
|
|
tag: "Test tag",
|
|
icon: undefined,
|
|
};
|
|
return new Notification("Test title", options);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form id="notificationForm" onsubmit="showNotification();">
|
|
<input type="submit" value="Show notification" id="submit"/>
|
|
</form>
|
|
</body>
|
|
</html>
|