Skip to content

Commit e72f38c

Browse files
committed
update example
1 parent c68b99b commit e72f38c

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<label for="message">Notification Text</label>
2121
<textarea class="form-control" rows="3" id="message" placeholder="Notification Text"></textarea>
2222
</div>
23-
<button class="show-button btn btn-primary" notification-title="title" notification-text="text">Show Notification</button>
23+
<button type="button" class="show-button btn btn-primary" notification-title="title" notification-text="text">Show Notification</button>
2424
</form>
2525
</body>
2626
</html>

web-notification.js

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,25 @@
66
* @param {function} [hide] - The hide notification function
77
*/
88

9-
(function create(context, factory) {
9+
/**
10+
* A simplified web notification API.
11+
*
12+
* @name webNotification
13+
* @namespace webNotification
14+
* @author Sagie Gur-Ari
15+
*/
16+
17+
/**
18+
* Initializes the web notification API.
19+
*
20+
* @function
21+
* @memberof! webNotification
22+
* @alias webNotification.initWebNotification
23+
* @private
24+
* @param {Object} context - The root context (window/global/...)
25+
* @param {function} factory - Returns a new instance of the API
26+
*/
27+
(function initWebNotification(context, factory) {
1028
'use strict';
1129

1230
var webNotification = factory(context.Notification);
@@ -24,13 +42,6 @@
2442
}(this, function initWebNotification(NotifyLib) {
2543
'use strict';
2644

27-
/**
28-
* A simplified web notification API.
29-
*
30-
* @name webNotification
31-
* @namespace webNotification
32-
* @author Sagie Gur-Ari
33-
*/
3445
var service = {};
3546

3647
/**

0 commit comments

Comments
 (0)