Search completed in 1.05 seconds.
Notification.Notification() - Web APIs
the
notification() constructor creates a new
notification object instance, which represents a user
notification.
... syntax var my
notification = new
notification(title, options); parameters title defines a title for the
notification, which is shown at the top of the
notification window.
... options optional an options object containing any custom settings that you want to apply to the
notification.
...And 18 more matches
NotificationEvent.notification - Web APIs
the
notification read-only property of the
notificationevent interface returns the instance of the
notification that was clicked to fire the event.
... the
notification provides read-only access to many properties that were set at the instantiation time of the
notification such as tag and data attributes that allow you to store information for defered use in the
notificationclick event.
... returns a
notification object.
...And 2 more matches
NotificationEvent.NotificationEvent() - Web APIs
the
notificationevent() constructor creates a new
notificationevent object.
... syntax var my
notificationevent = new
notificationevent(type,
notificationeventinit); parameters type tbd
notificationeventinit optional a dictionary object containing a
notification object to be used as the
notification the event is dispatched on.
... example var n = new
notification('hello'); var init = {
notification: n }; var my
notificationevent = new
notificationevent(type, init); specifications specification status comment
notifications apithe definition of '
notificationevent() constructor' in that specification.
PopupNotifications.jsm
the popup
notifications.jsm javascript code module provides a popup
notification box service.
... this service is used, for example, to display geolocation related
notifications.
... to use this, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/popup
notifications.jsm"); once you've imported the module, you can then use the popup
notifications object it exports; this object provides methods for creating and displaying popup
notification panels.
...And 57 more matches
Using the Notifications API - Web APIs
the
notifications api lets a web page or app send
notifications that are displayed outside the page at the system level; this lets web apps send information to a user even if the application is idle or in the background.
... typically, system
notifications refer to the operating system's standard
notification mechanism: think for example of how a typical desktop system or mobile device broadcasts
notifications.
... the system
notification system will vary of course by platform and browser, but this is ok, and the
notifications api is written to be general enough for compatibility with most system
notification systems.
...And 52 more matches
Notification - Web APIs
the
notification interface of the
notifications api is used to configure and display desktop
notifications to the user.
... these
notifications' appearance and specific functionality vary across platforms but generally they provide a way to asynchronously provide information to the user.
... constructor
notification() creates a new instance of the
notification object.
...And 39 more matches
Observer Notifications
if your component requires access to the user profile, or any services which require access to the profile (preferences, bookmarks, and so on) then a common pattern is to register with the nsicategorymanager for the app-startup topic which can be done in the component's registration code, and then in that
notification register with the observer service for the profile-after-change
notification.
... see receiving startup
notifications for more information about how this works.
... starting in firefox 3.5 components can simply register for the profile-after-change
notification in nsicategorymanager.
...And 33 more matches
notificationbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] the
notificationbox element is used to display
notifications above an element.
...the
notification element is used for each
notification, and will be created automatically for each item.
... each
notification will slide in and out as needed.
...And 31 more matches
Web Push API Notifications best practices - Web APIs
this article provides a useful summary of best practices to keep in mind when developing web sites and applications that use push
notifications for user engagement.
... “if done well, it's nice to have, but if not done well, it's really annoying.” — overheard conversation between two browser developers discussing the ethics of push
notifications.
... overview of web push
notifications web push
notifications (created using a combination of the
notifications, push, and service worker apis) are part of the rising noise that product developers and marketers are using to get attention for their sites.
...And 20 more matches
ServiceWorkerRegistration.showNotification() - Web APIs
the show
notification() method of the serviceworkerregistration interface creates a
notification on an active service worker.
... syntax ​serviceworkerregistration.show
notification(title, [options]); parameters title the title that must be shown within the
notification options optional an object that allows configuring the
notification.
... it can have the following properties: actions: an array of actions to display in the
notification.
...And 19 more matches
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
but instead of relying only on user actions, we can do more, using push messages and
notifications to automatically re-engage and deliver new content whenever it is available.
... two apis, one goal the push api and
notifications api are two separate apis, but they work well together when you want to provide engaging functionality in your app.
...
notifications can be used by the service worker to show new information to the user, or at least alert them when something has been updated.
...And 19 more matches
Observer Notifications - Archive of obsolete content
an observer is an object that is responsible to observe (wait for)
notifications and then to carry out subsequent actions.
...the first parameter (subject) can be any xpcom object, the second parameter is a
notification topic, and the final parameter is a string that further describes the
notification.
...the first parameter is an observer object, the second parameter is a
notification topic, and the third parameter is a boolean which indicates whether the observer service should hold a weak reference to the observer.
...And 17 more matches
appendNotification - Archive of obsolete content
« xul reference home append
notification( label , value , image , priority , buttons, eventcallback ) return type: element create a new
notification and display it.
... if another
notification is already present with a higher priority, the new
notification will be added behind it.
... label - label to appear on the
notification.
...And 16 more matches
User Notifications and Alerts - Archive of obsolete content
the
notificationbox element you have probably seen these before.
...this kind of
notification is implemented with a
notificationbox.
... this kind on
notification is very easy to implement, it doesn't interrupt the user and is easy to read and dismiss, so it is our recommended way of displaying alerts and
notifications.
...And 15 more matches
Notifications API - Web APIs
the
notifications api allows web pages to control the display of system
notifications to the end user.
...the api is designed to be compatible with existing
notification systems, across different platforms.
... concepts and usage on supported platforms, showing a system
notification generally involves two things.
...And 14 more matches
Using popup notifications
popup
notifications, also known as "doorhanger
notifications", are presented to notify the user of something that's important but may not need immediate attention.
... these non-modal
notifications let the user make decisions when they have a moment to do so, instead of being forced to deal with them at possibly inconvenient times.
... for example, this popup
notification is displayed when a web site requests geolocation information: this lets the user decide whether or not to share their location when it's convenient to do so, instead of being compelled to do it at once.
...And 12 more matches
notification - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] the
notification is used to display an informative message.
... it will normally be used as part of a
notificationbox.
... attributes image, label, priority, persistence, type, value properties accessibletype, control, image, label, priority, persistence, type, value methods close examples <
notification label="this is a warning"/> attributes image type: uri the uri of the image to appear on the element.
...And 10 more matches
NotificationEvent - Web APIs
the parameter passed into the on
notificationclick handler, the
notificationevent interface represents a
notification click event that is dispatched on the serviceworkerglobalscope of a serviceworker.
... constructor
notificationevent() creates a new
notificationevent object.
...
notificationevent.
notification read only returns a
notification object representing the
notification that was clicked to fire the event.
...And 8 more matches
Navigator.mozNotification - Archive of obsolete content
mobile only in gecko 2.0 available only in firefox mobile as of gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) provides support for creating
notification objects, which are used to display desktop
notification alerts to the user.
...see displaying
notifications for an example.
... the support for this property as been dropped in favor of the standard
notification constructor.
...And 7 more matches
Notification.requestPermission() - Web APIs
read using the
notifications api for a good example of how to feature detect this and run code as appropriate.
... the requestpermission() method of the
notification interface requests permission from the user for the current origin to display
notifications.
... syntax the latest spec has updated this method to a promise-based syntax that works like this:
notification.requestpermission().then(function(permission) { ...
...And 7 more matches
NotificationAction - Web APIs
the
notificationaction interface of the
notifications api is used to represent action buttons the user can click to interact with
notifications.
... these buttons' appearance and specific functionality vary across platforms but generally they provide a way to asynchronously show actions to the user in a
notification.
... properties instance properties these properties are available only on instances of the
notification object.
...And 7 more matches
Displaying notifications (deprecated) - Archive of obsolete content
to see how to use the standard api, please read: using web
notifications mobile only in gecko 2.0 available only in firefox mobile as of gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) firefox offers support for "desktop
notifications"; these are
notifications that are displayed to the user outside the context of the web content, using the standard
notification system provided by the operating system.
... for example, on android,
notifications appear in the bar at the top of the screen, and in the panel that appears when you drag that bar downward.
... creating a
notification the first thing you need to do is create the
notification object by using the navigator.moz
notification object's create
notification() method, as follows: var
notification = navigator.moz
notification.create
notification( "hey, check this out!", "this is a
notification posted by " + "firefox 4.
...And 6 more matches
Notification.close() - Web APIs
the close() method of the
notification interface is used to close/remove a previously displayed
notification.
... note: this api shouldn't be used just to have the
notification removed from the screen after a fixed delay since this method will also remove the
notification from any
notification tray, preventing users from interacting with it after it was initially shown.
... a valid use for this api would be to remove a
notification that is no longer relevant (e.g.
...And 6 more matches
Notification.permission - Web APIs
the permission read-only property of the
notification interface indicates the current permission granted by the user for the current origin to display web
notifications.
... syntax var permission =
notification.permission; value a domstring representing the current permission.
... the value can be: granted: the user has explicitly granted permission for the current origin to display system
notifications.
...And 5 more matches
ServiceWorkerRegistration.getNotifications() - Web APIs
the get
notifications() method of the serviceworkerregistration interface returns a list of the
notifications in the order that they were created from the current origin via the current service worker registration.
...
notifications created by one service worker on the same origin will not be available to other active services workers on that same origin.
... syntax s​erviceworkerregistration.get
notifications(options) .then(function(
notificationslist) { ...
...And 5 more matches
Receiving startup notifications
sometimes it's necessary for xpcom components to receive
notifications as to the progress of the application's startup process, so they can start new services at appropriate times, for example.
... receiving startup
notifications in gecko 2.0 (firefox 4) and later in order to improve startup times, changes were made to the xpcom startup process.
...additionally, the earliest startup time
notification you can receive is now profile-after-change.
...And 4 more matches
onnotificationclose - Web APIs
the serviceworkerglobalscope.on
notificationclose property is an event handler called whenever the
notificationclose event is dispatched on the serviceworkerglobalscope object, that is when a user closes a displayed
notification spawned by serviceworkerregistration.show
notification().
...
notifications created on the main thread or in workers which aren't service workers using the
notification() constructor will instead receive a close event on the
notification object itself.
... note: trying to create a
notification inside the serviceworkerglobalscope using the
notification() constructor will throw an error.
...And 4 more matches
notifications - Archive of obsolete content
usage this api supports desktop
notifications on windows, os x using growl (and
notification center as of os x 10.9 mavericks), and linux using libnotify.
... var
notifications = require("sdk/
notifications");
notifications.notify({ title: "jabberwocky", text: "'twas brillig, and the slithy toves", data: "did gyre and gimble in the wabe", onclick: function (data) { console.log(data); // console.log(this.data) would produce the same result.
... var
notifications = require("sdk/
notifications"); var self = require("sdk/self"); var myiconurl = self.data.url("myicon.png");
notifications.notify({ text: "i have an icon!", iconurl: myiconurl }); from firefox 34, you can use "./myicon.png" as an alias for self.data.url("myicon.png").
...And 3 more matches
Notification.silent - Web APIs
the silent read-only property of the
notification interface specifies whether the
notification should be silent, i.e., no sounds or vibrations should be issued, regardless of the device settings.
... this is specified in the silent option of the
notification() constructor.
... syntax var silent =
notification.silent; value a boolean.
...And 3 more matches
Notification.tag - Web APIs
the tag read-only property of the
notification interface signifies an identifying tag for the
notification, as specified in the tag option of the
notification() constructor.
... the idea of
notification tags is that more than one
notification can share the same tag, linking them together.
... one
notification can then be programmatically replaced with another to avoid the users' screen being filled up with a huge number of similar
notifications.
...And 3 more matches
ServiceWorkerGlobalScope.onnotificationclick - Web APIs
the serviceworkerglobalscope.on
notificationclick property is an event handler called whenever the
notificationclick event is dispatched on the serviceworkerglobalscope object, that is when a user clicks on a displayed
notification spawned by serviceworkerregistration.show
notification().
...
notifications created on the main thread or in workers which aren't service workers using the
notification() constructor will instead receive a click event on the
notification object itself.
... note: trying to create a
notification inside the serviceworkerglobalscope using the
notification() constructor will throw an error.
...And 3 more matches
Notification.actions - Web APIs
the actions read-only property of the
notification interface returns the list of
notificationaction objects set using the actions option when creating the
notification using the
notification() constructor.
... this is a list of the application-defined actions the user can choose to take immediately within the context of a
notification.
...this limit can be infered from
notification.maxactions.
...And 2 more matches
Notification.data - Web APIs
the data read-only property of the
notification interface returns a structured clone of the
notification's data, as specified in the data option of the
notification() constructor.
... the
notification's data can be any arbitrary data that you want associated with the
notification.
... syntax var data =
notification.data; value a structured clone.
...And 2 more matches
Notification.onclick - Web APIs
the onclick property of the
notification interface specifies an event listener to receive click events.
... these events occur when the user clicks on a displayed
notification.
... syntax
notification.onclick = function(event) { ...
...And 2 more matches
Notification.renotify - Web APIs
the renotify read-only property of the
notification interface specifies whether the user should be notified after a new
notification replaces an old one, as specified in the renotify option of the
notification() constructor.
... syntax var renotify =
notification.renotify; value a boolean.
... false is the default; true makes the
notification renotify the user.
...And 2 more matches
Notification.timestamp - Web APIs
the timestamp read-only property of the
notification interface returns a domtimestamp, as specified in the timestamp option of the
notification() constructor.
... the
notification's timestamp can represent the time, in milliseconds since 00:00:00 utc on 1 january 1970, of the event for which the
notification was created, or it can be an arbitrary timestamp that you want associated with the
notification.
... syntax var timestamp =
notification.timestamp; value a domtimestamp.
...And 2 more matches
Notification.vibrate - Web APIs
the vibrate read-only property of the
notification interface specifies a a vibration pattern for the device's vibration hardware to emit when the
notification fires.
... this is specified in the vibrate option of the
notification() constructor.
... syntax var vibrate =
notification.vibrate; value a vibration pattern, as specified in the vibration api spec.
...And 2 more matches
Notifications - Archive of obsolete content
the
notification box appears at the bottom right corner of the browser and displays important information to the user.
... the namespace for this class is jetpack.
notifications.
... methods show(titlestring, [body as string] iconstring)draws a
notification box.
... titlethe head of the
notification message.string bodythe message itself.stringfalse iconthe url of an .ico file.string jetpack.
notifications.show("hello world"); var mybody = " my first message body on jetpack"; var myicon = "http://www.mozilla.com/favicon.ico"; jetpack.
notifications.show({title: "my first message on jetpack", body: mybody, icon: myicon}); ...
notification.type - Archive of obsolete content
« xul reference home type type: one of the values below indicates the type of
notification, determined from the priority.
... info a
notification that is of lesser importance.
... warning a normal warning
notification.
... critical a critical
notification.
Notification.dir - Web APIs
the dir read-only property of the
notification interface indicates the text direction of the
notification, as specified in the dir option of the
notification() constructor.
... syntax var direction =
notification.dir; value a domstring specifying the text direction.
... examples the following snippet fires a
notification; a simple options object is created, then the
notification is fired using the
notification() constructor.
... var options = { body: 'do you like my body?', dir: 'rtl' } var n = new
notification('test
notification',options); console.log(n.dir) // should return 'rtl' specifications specification status comment
notifications apithe definition of 'dir' in that specification.
Notification.icon - Web APIs
the icon read-only property of the
notification interface contains the url of an icon to be displayed as part of the
notification, as specified in the icon option of the
notification() constructor.
... syntax var icon =
notification.icon; value a usvstring.
... examples in our to-do list app (view the app running live), we use the
notification() constructor to fire a
notification, passing it arguments to specify the body, icon and title we want.
... var
notification = new
notification('to do list', { body: text, icon: img }); specifications specification status comment
notifications apithe definition of 'icon' in that specification.
Notification.lang - Web APIs
the lang read-only property of the
notification interface indicates the language used in the
notification, as specified in the lang option of the
notification() constructor.
... syntax var language =
notification.lang; value a domstring specifying the language tag.
... examples the following snippet fires a
notification; a simple options object is created, then the
notification is fired using the
notification() constructor.
... var options = { body: 'do you like my body?', lang: 'en-us' } var n = new
notification('test
notification',options); console.log(n.lang) // should return 'en-us' specifications specification status comment
notifications apithe definition of 'lang' in that specification.
Notification.maxActions - Web APIs
the maxactions attribute of the
notification interface returns the maximum number of actions supported by the device and the user agent.
... effectively, this is the maximum number of elements in
notification.actions array which will be respected by the user agent.
... syntax
notification.maxactions value an integer number which indicates the largest number of
notification actions that can be presented to the user by the user agent and the device.
... const maxactions =
notification.maxactions; console.log('this device can display at most ' + maxactions + ' actions on each
notification.'); specifications specification status comment
notifications api living standard living standard ...
Notification.requireInteraction - Web APIs
the requireinteraction read-only property of the
notification interface returns a boolean indicating that a
notification should remain active until the user clicks or dismisses it, rather than closing automatically.
... note: this can be set when the
notification is first created by setting the requireinteraction option to true in the options object of the
notification.
notification() constructor.
... syntax function spawn
notification(thetitle,thebody,shouldrequireinteraction) { var options = { body: thebody, requireinteraction: shouldrequireinteraction } var n = new
notification(thetitle,options); } value a boolean.
... specifications specification status comment
notifications apithe definition of 'requireinteraction' in that specification.
NotificationEvent.action - Web APIs
returns the string id of the
notification button the user clicked.
... this value returns an empty string if the user clicked the
notification somewhere other than an action button, or the
notification does not have a button.
... the
notification id is set during the creation of the
notification via the actions array attribute and can't be modified unless the
notification is replaced.
... example self.registration.show
notification("new articles available", { actions: [{action: "get", title: "get now."}] }); self.addeventlistener('
notificationclick', function(event) { event.
notification.close(); if (event.action === 'get') { synchronizereader(); } else { clients.openwindow("/reader"); } }, false); specifications specification status comment
notifications apithe definition of 'action' in that specification.
Alerts and Notifications - Archive of obsolete content
this works on windows, linux and (if growl is installed) mac os x: function popup(title, text) { try { components.classes['@mozilla.org/alerts-service;1'] .getservice(components.interfaces.nsialertsservice) .showalert
notification(null, title, text, false, '', null); } catch(e) { // prevents runtime error on platforms that don't implement nsialertsservice } } if you need to display a comparable alert on a platform that doesn't support nsialertsservice, you can do this: function popup(title, msg) { var image = null; var win = components.classes['@mozilla.org/embedcomp/window-watcher;1'] ...
....getservice(components.interfaces.nsiwindowwatcher) .openwindow(null, 'chrome://global/content/alerts/alert.xul', '_blank', 'chrome,titlebar=no,popup=yes', null); win.arguments = [image, title, msg, false, '']; } using
notification box another way of non-modal
notification and further interaction with users is using of xul elements
notificationbox and
notification (implicitly).
... var message = 'another pop-up blocked'; var box = gbrowser.get
notificationbox(); var
notification = box.get
notificationwithvalue('popup-blocked'); if (
notification) {
notification.label = message; } else { var buttons = [{ label: 'button', accesskey: 'b', popup: 'blockedpopupoptions', callback: null }]; let priority = box.priority_warning_medium; box.append
notification(message, 'popup-blocked', 'chrome://browser/skin/info.png', priority, buttons); } ...
nsIDOMNavigatorDesktopNotification
dom/interfaces/
notification/nsidomnavigatordesktop
notification.idlscriptable property that extends the navigator object.
...attributes attribute type description moz
notification nsidomdesktop
notificationcenter read only.
... see also nsidomdesktop
notificationcenter ...
nsITextInputProcessorNotification
dom/interfaces/base/nsitextinputprocessorcallback.idlscriptable this interface of a request or
notification to ime 1.0 66 introduced gecko 38 inherits from: nsisupports last changed in gecko 38.0 (firefox 38.0 / thunderbird 38.0 / seamonkey 2.35) this interface tells details of a request or
notification to ime.
... when gecko supports new
notification to ime, this interface may have some new attributes.
... attributes attribute type description type acstring the type of request or
notification to ime.
BluetoothRemoteGATTCharacteristic.startNotifications() - Web APIs
the bluetoothremotegattcharacteristic.start
notifications() method returns a promise to the bluetoothremotegattcharacteristic instance when there is an active
notification on it.
... syntax bluetoothremotegattcharacteristic.start
notifications().then(function(bluetoothremotegattcharacteristic) { ...
... specifications specification status comment web bluetooththe definition of 'start
notifications()' in that specification.
BluetoothRemoteGATTCharacteristic.stopNotifications() - Web APIs
the bluetoothremotegattcharacteristic.stop
notifications() method returns a promise to the bluetoothremotegattcharacteristic instance when there is no longer an active
notification on it.
... syntax bluetoothremotegattcharacteristic.stop
notifications().then(function(bluetoothremotegattcharacteristic) { ...
... specifications specification status comment web bluetooththe definition of 'stop
notifications()' in that specification.
Notification.badge - Web APIs
the badge property of the
notification interface returns the url of the image used to represent the
notification when there is not enough space to display the
notification itself.
... syntax var url =
notification.badge value a usvstring containing a url.
... specifications specification status comment
notifications apithe definition of 'badge' in that specification.
Notification.body - Web APIs
the body read-only property of the
notification interface indicates the body string of the
notification, as specified in the body option of the
notification() constructor.
... syntax var body =
notification.body; value a domstring.
... examples function spawn
notification(thebody, theicon, thetitle) { var options = { body: thebody, icon: theicon } var n = new
notification(thetitle, options); console.log(n.body); } specifications specification status comment
notifications apithe definition of 'body' in that specification.
Notification.image - Web APIs
the image read-only property of the
notification interface contains the url of an image to be displayed as part of the
notification, as specified in the image option of the
notification() constructor.
... syntax var image =
notification.image; value a usvstring.
... specifications specification status comment
notifications apithe definition of 'image' in that specification.
Notification.onclose - Web APIs
the onclose property of the
notification interface specifies an event listener to receive close events.
... these events occur when a
notification is closed.
... syntax
notification.onclose = function() { ...
Notification.onerror - Web APIs
the onerror property of the
notification interface specifies an event listener to receive error events.
... these events occur when something goes wrong with a
notification (in many cases an error preventing the
notification from being displayed.) syntax
notification.onerror = function() { ...
... }; specifications specification status comment
notifications apithe definition of 'onerror' in that specification.
Notification.onshow - Web APIs
the onshow property of the
notification interface specifies an event listener to receive show events.
... these events occur when a
notification is displayed.
... syntax
notification.onshow = function() { ...
Notification.title - Web APIs
the title read-only property of the
notification interface indicates the title of the
notification, as specified in the title parameter of the
notification() constructor.
... syntax var title =
notification.title; value a domstring.
... examples function spawn
notification(thebody,theicon,thetitle) { var options = { body: thebody, icon: theicon } var n = new
notification(thetitle,options); console.log(n.title) } specifications specification status comment
notifications apithe definition of 'title' in that specification.
ServiceWorkerGlobalScope: notificationclick event - Web APIs
the
notificationclick event is fired to indicate that a system
notification spawned by serviceworkerregistration.show
notification() has been clicked.
... bubbles no cancelable no interface
notificationevent event handler on
notificationclick examples you can use the
notificationclick event in an addeventlistener method: self.addeventlistener('
notificationclick', function(event) { console.log('on
notification click: ', event.
notification.tag); event.
notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); or use th...
...e on
notificationclick event handler property: self.on
notificationclick = function(event) { console.log('on
notification click: ', event.
notification.tag); event.
notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }; specifications specification status
notifications apithe definition of 'on
notificationclick' in that specification.
getNotificationWithValue - Archive of obsolete content
« xul reference home get
notificationwithvalue( value ) return type:
notification element retrieve the
notification with a particular value.
... the value is specified when adding the
notification with append
notification.
removeTransientNotifications - Archive of obsolete content
« xul reference home removetransient
notifications( ) return type: no return value remove only those
notifications that have a persistence value of zero, and decrements by one the persistence value of those that have a non-zero value.
ui.alertNotificationOrigin
ui.alert
notificationorigin controls the position and direction from which popup
notifications invoked by nsialertsservice are sliding in.
Index - Web APIs
328 bluetoothremotegattcharacteristic.start
notifications() api, bluetooth, bluetoothremotegattcharacteristic, experimental, property, reference, web bluetooth api, start
notifications() the bluetoothremotegattcharacteristic.start
notifications() method returns a promise to the bluetoothremotegattcharacteristic instance when there is an active
notification on it.
... 329 bluetoothremotegattcharacteristic.stop
notifications() api, bluetooth, bluetoothremotegattcharacteristic, experimental, property, reference, web bluetooth api, stop
notifications the bluetoothremotegattcharacteristic.stop
notifications() method returns a promise to the bluetoothremotegattcharacteristic instance when there is no longer an active
notification on it.
...this value gets updated when the value of the characteristic is read or updated via a
notification or indication.
...And 64 more matches
Index
72 observer
notifications xpcom, xpcom:add-ons the following are topics that you can observe during the course of an application.
... 118 receiving startup
notifications component manager, embedding mozilla, needsupdate, xpcom sometimes it's necessary for xpcom components to receive
notifications as to the progress of the application's startup process, so they can start new services at appropriate times, for example.
... 187 imgidecoderobserver interfaces, interfaces:scriptable, needscontent, reference, xpcom interface reference, needsattention we make the distinction here between "load" and "decode"
notifications.
...And 31 more matches
IME handling guide
therefore, imecontentobserver only stores which
notification should be sent to widget and/or ime.
... then, mozilla::imecontentobserver::ime
notificationsender tries to send the pending
notifications when it might become safe to do that.
... see also
notifications to ime section for the detail of sending
notifications.
...And 26 more matches
Index - Archive of obsolete content
6 navigator.moz
notification api, deprecated, mobile, non-standard, property, reference provides support for creating
notification objects, which are used to display desktop
notification alerts to the user.
...see displaying
notifications for an example.
... 48
notifications add-on sdk,
notifications display transient, toaster-style desktop messages to the user.
...And 24 more matches
imgIDecoderObserver
1.0 66 introduced gecko 12.0 inherits from: imgicontainerobserver last changed in gecko 1.7 we make the distinction here between "load" and "decode"
notifications.
... load
notifications are fired as the image is loaded from the network or filesystem.
... decode
notifications are fired as the image is decoded.
...And 17 more matches
Starting WebLock
when the
notification is made, the nsiobserverservice broadcasts the
notification from the caller of the notifyobserver() to the nsiobserver object's observe() method.
...if the object has only registered for one
notification, then you can ignore the atopic string and simply handle the event as it occurs.
... ns_imethodimp weblock::observe(nsisupports *asubject, const char *atopic, const prunichar *adata) { return ns_ok; }
notification via the observer service is somewhat indirect.
...And 15 more matches
nsIAlertsService
note: since gecko 22, the
notifications are provided by firefox and have become platform-independent.
... implemented by: @mozilla.org/alerts-service;1 as a service: var alertsservice = components.classes["@mozilla.org/alerts-service;1"] .getservice(components.interfaces.nsialertsservice); method overview void showalert
notification(in astring imageurl, in astring title, in astring text, [optional] in boolean textclickable, [optional] in astring cookie, [optional] in nsiobserver alertlistener, [optional] in astring name, [optional] in astring dir, [optional] in astring lang, [optional] in astring data, [optional] in nsiprincipal principal,[optional] in boolean inprivatebrowsing); void closealert([optional] in astring name, [optional] in nsiprincipal principal); methods showalert
notification() displays a
notification window.
... void showalert
notification( in astring imageurl, in astring title, in astring text, in boolean textclickable, optional in astring cookie, optional in nsiobserver alertlistener, optional in astring name, optional in astring dir, optional in astring lang, optional in astring data, optional in nsiprincipal principal, optional in boolean inprivatebrowsing, optional ); parameters imageurl a url identifying the image to display in the
notification alert.
...And 14 more matches
Index - Archive of obsolete content
213
notification.type xul attributes, xul reference no summary!
... 454 append
notification xul methods, xul reference no summary!
... 492 get
notificationbox xul methods, xul reference no summary!
...And 13 more matches
Listening to events on all tabs
adding a listener to listen to progress events on all tabs, call the browser's addtabsprogresslistener() method: gbrowser.addtabsprogresslistener(myprogresslistener); myprogresslistener is an object that implements the callbacks used to provide
notifications of progress events.
... onsecuritychange
notification called for security progress.
... note: these
notifications will only occur if a security package is installed.
...And 13 more matches
Introduction to NSPR
nspr thread synchronization thread synchronization has two aspects: locking and
notification.
...
notification involves passing synchronization information among cooperating threads.
...the communication available is a semantic-free
notification whose context must be supplied by the programmer.
...And 11 more matches
nsIObserverService
xpcom/ds/nsiobserverservice.idlscriptable this interface provides methods to add, remove, notify, and enumerate observers of various
notifications.
... inherits from: nsisupports last changed in gecko 0.9.6 the xpcom nsobserverservice implements this interface to provide global
notifications for a variety of subsystems.
... void addobserver( in nsiobserver anobserver, in string atopic, in boolean ownsweak); nsisimpleenumerator enumerateobservers( in string atopic ); void notifyobservers( in nsisupports asubject, in string atopic, in wstring somedata ); void removeobserver( in nsiobserver anobserver, in string atopic ); methods addobserver() registers a given listener for a
notifications regarding the specified topic.
...And 11 more matches
Mail event system
when a
notification is fired on a folder, all of the folder's folder listeners and the mail session itself is notified.
...if the object wants to know about all
notifications on all folders, then it should register with the mail session.
... nsimsgmailsession.idl is a service that acts as a broadcaster for folder
notifications.
...And 9 more matches
Monitoring plugins - Archive of obsolete content
this component then reports the plugin runtime using the observer service to anyone registered to receive the
notifications.
... usage to make use of the new component you must register to receive its runtime
notifications using the observer service.
... the
notification's topic is experimental-notify-plugin-call.
...And 8 more matches
Tabbed browser - Archive of obsolete content
notification when a tab is added or removed function exampletabadded(event) { var browser = gbrowser.getbrowserfortab(event.target); // browser is the xul element of the browser that's been added } function exampletabmoved(event) { var browser = gbrowser.getbrowserfortab(event.target); // browser is the xul element of the browser that's been moved } function exampletabremoved(event) { var browser...
...
notification when a tab's attributes change requires gecko 2.0(firefox 4 / thunderbird 3.3 / seamonkey 2.1) starting in gecko 2.0, you can detect when a tab's attributes change by listening for the tabattrmodified event.
... busy image selected function exampletabattrmodified(event) { var tab = event.target; // now you can check what's changed on the tab } // during initialization var container = gbrowser.tabcontainer; container.addeventlistener("tabattrmodified", exampletabattrmodified, false); // when no longer needed container.removeeventlistener("tabattrmodified", exampletabattrmodified, false);
notification when a tab is pinned or unpinned requires gecko 2.0(firefox 4 / thunderbird 3.3 / seamonkey 2.1) starting in gecko 2.0, tabs can be "pinned"; that is, they become special application tabs ("app tabs"), which are pinned to the beginning of the tab bar, and show only the favicon.
...And 7 more matches
nsINavHistoryObserver
delete
notifications aren't quite 100% accurate.
... batch delete operations take place in two steps; the
notifications come first, followed by a bulk delete.
... if an error occurs in between these two steps (for example, an out of memory error), then you may get a
notification even though the page doesn't wind up getting deleted.
...And 7 more matches
nsIWebProgressListener
void onlocationchange( in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri alocation, [optional] in unsigned long aflags ); parameters awebprogress the nsiwebprogress instance that fired the
notification.
...optional from gecko 11 onprogresschange()
notification that the progress has changed for one of the requests associated with awebprogress.
... void onprogresschange( in nsiwebprogress awebprogress, in nsirequest arequest, in long acurselfprogress, in long amaxselfprogress, in long acurtotalprogress, in long amaxtotalprogress ); parameters awebprogress the nsiwebprogress instance that fired the
notification.
...And 7 more matches
Web Console remoting - Firefox Developer Tools
the tabnavigated
notification comes from tab actors.
... prior to firefox 20 the web console actor provided a locationchange listener, with an associated locationchanged
notification.
... this is no longer the case: we have made changes to allow the web console client to reuse the tabnavigated
notification (bug 792062).
...And 7 more matches
Creating Sandboxed HTTP Connections
channel.asyncopen(listener, null); http
notifications the above mentioned listener is a nsistreamlistener, which gets notified about events such as http redirects and data availability.
... since nsistreamlistener does not cover cookies, the current channel being used will need to be stored as a global, since another listener will be used for cookie
notifications (covered in the next section).
...l // the io service var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); // create an nsiuri var uri = ioservice.newuri(myurlstring, null, null); // get a channel for that nsiuri gchannel = ioservice.newchannelfromuri(uri); // get an listener var listener = new streamlistener(callbackfunc); gchannel.
notificationcallbacks = listener; gchannel.asyncopen(listener, null); function streamlistener(acallbackfunc) { this.mcallbackfunc = acallbackfunc; } streamlistener.prototype = { mdata: "", // nsistreamlistener onstartrequest: function (arequest, acontext) { this.mdata = ""; }, ondataavailable: function (arequest, acontext, astream, asourceoffset, alength) { var scriptableinputstream = ...
...And 6 more matches
nsIDocShell
atitle, in domstring aurl, in boolean areplace); void beginrestore(in nsicontentviewer viewer, in boolean top); void createaboutblankcontentviewer(in nsiprincipal aprincipal); void createloadinfo(out nsidocshellloadinfo loadinfo); void detacheditorfromwindow(); violates the xpcom interface guidelines void finishrestore(); void firepagehide
notification(in boolean isunload); native code only!
... void fireunload
notification(); native code only!
... beginrestore() begin firing webprogresslistener
notifications for restoring a page presentation.
...And 6 more matches
nsIFaviconService
note: this is an asynchronous operation; when it completes, a "places-favicons-expired"
notification is dispatched through the observer's service.
...this will make the
notifications more efficient since the icon will already have data when the set favicon observer messages goes out.
...this function does not send out
notifications that the data has changed.
...And 6 more matches
Checking when a deadline is due - Web APIs
the main example application we will be referring to in this article is to-do list
notifications, a simple to-do list application that stores task titles and deadline times and dates via indexeddb, and then provides users with
notifications when deadline dates are reached, via the
notification, and vibration apis.
... you can download the to-do list
notifications app from github and play around with the source code, or view the app running live.
...if they do, we want to let the user know with some kind of
notification.
...And 6 more matches
Push API - Web APIs
this lets developers deliver asynchronous
notifications and updates to users that opt in, resulting in better engagement with timely new content.
...when the service worker is active, it can subscribe to push
notifications, using pushmanager.subscribe().
...this allows apps to react to push messages being received, for example, by displaying a
notification (using serviceworkerregistration.show
notification().) each subscription is unique to a service worker.
...And 6 more matches
Component Internals
xpcom sends a
notification that it's beginning startup.
... when the registration process begins, xpcom broadcasts to all registered observers a
notification that says xpcom has begun the registration of new components.
... after all components are registered, another
notification is fired saying that xpcom is done with the registration step.
...And 5 more matches
nsIChannel
notificationcallbacks nsiinterfacerequestor the
notification callbacks for the channel.
... this is set by clients, who wish to provide a means to receive progress, status and protocol-specific
notifications.
... if this value is null, the channel implementation may use the
notification callbacks from its load group.
...And 5 more matches
nsIObserver
xpcom/ds/nsiobserver.idlscriptable this interface is implemented by an object that wishes to observe
notifications.
... these
notifications are often, though not always, broadcast via the nsiobserverservice.
... inherits from: nsisupports last changed in gecko 0.9.6 method overview void observe(in nsisupports asubject, in string atopic, in wstring adata); methods observe() this method will be called when there is a
notification for the topic that the observer has been registered for.
...And 5 more matches
nsIWindowWatcher
note that there is no interface for such
notifications (not a public one, anyway).
...pter(in nsidomwindow aparent); nsiprompt getnewprompter(in nsidomwindow aparent); nsidomwindow getwindowbyname(in wstring atargetname, in nsidomwindow acurrentwindow); nsisimpleenumerator getwindowenumerator(); nsidomwindow openwindow(in nsidomwindow aparent, in string aurl, in string aname, in string afeatures, in nsisupports aarguments); void register
notification(in nsiobserver aobserver); void setwindowcreator(in nsiwindowcreator creator); void unregister
notification(in nsiobserver aobserver); attributes attribute type description activewindow nsidomwindow the watcher serves as a global storage facility for the current active (front most non-floating-palette-type) window, storing and returning it on...
... note: this method may dispatch a "toplevel-window-ready"
notification via nsiobserverservice if the window did not already exist.
...And 5 more matches
Index of archived content - Archive of obsolete content
.htaccess ( hypertext access ) 2015 mdn fellowship program api navigator navigator.moz
notification add-ons add-on sdk builder guides content scripts communicating with other scripts communicating using "port" communicating using "postmessage" cross-domain content scripts interacting with page scripts loading content scripts reddit example port self ...
... testing the add-on sdk two types of scripts working with events xul migration guide high-level apis addon-page base64 clipboard context-menu hotkeys indexed-db l10n
notifications page-mod page-worker panel passwords private-browsing querystring request selection self simple-prefs simple-storage system tabs timers ui url widget ...
...eb pages based on url modifying the page hosted by a tab open a web page troubleshooting unit testing using xpcom without chrome using third-party modules (jpm) bootstrapped extensions code snippets alerts and
notifications autocomplete bookmarks boxes canvas code snippets cookies customizing the download progress bar delayed execution dialogs and prompts downloading files drag & drop embedding svg examples and demos from articles file i/o finding wi...
...And 4 more matches
Working with Svelte stores - Learn web development
components can subscribe to stores and receive
notifications when their values change.
... objective: learn how to use svelte stores using stores we will create an alert component that shows
notifications on screen, which can receive messages from any component.
...these kind of widgets might also be known as popup
notifications, toast, or
notification bubbles.
...And 4 more matches
nsITextInputProcessorCallback
dom/interfaces/base/nsitextinputprocessor.idlscriptable a callback interface for nsitextinputprocessor user 1.0 66 introduced gecko 38 inherits from: nsisupports last changed in gecko 38.0 (firefox 38.0 / thunderbird 38.0 / seamonkey 2.35) nsitextinputprocessorcallback is defined for receiving requests and
notifications to ime from gecko.
... example of simple js-ime: var simpleime = { _hasfocus: false, _hasrightstocompose: false, _tip: null, _callback: function simpleime_callback(atip, a
notification) { try { switch (a
notification.type) { case "request-to-commit": atip.commitcomposition(); break; case "request-to-cancel": atip.cancelcomposition(); break; case "notify-focus": this._hasfocus = true; break; case "notify-blur": this._hasfocus = false; break; case "notify-detached": this._hasfocus = false; this._hasrightstocompose = false; break; } return true; } ca...
... }, } method overview boolean onnotify(in nsitextinputprocessor atextinputprocessor, in nsitextinputprocessor
notification a
notification); methods onnotify() this is called when gecko requests or notifies something to ime.
...And 4 more matches
Inline options - Archive of obsolete content
if you need script support, see the display
notifications section.
..."radio" title="options 2"> <radiogroup> <radio value="false" label="disabled"/> <radio value="true" label="enabled"/> </radiogroup> </setting> <!-- button example - not tied to a preference, but attached to a command --> <setting title="do something" type="control"> <button id="myaddon-button" label="click me" oncommand="alert('thank you!');"/> </setting> setting element changed
notifications most of the setting elements (it might be all i havent really looked), support oninputchanged attribute.
... some discussion on the subject at stackoverflow: how to use addeventlistener on inputchanged of inline options display
notifications if you want to use the settings ui for anything more than storing preferences, then you will probably need to initialize them when they first appear.
...And 3 more matches
Mozilla Crypto FAQ - Archive of obsolete content
as long as you are simply mirroring the mozilla site as is, you do not need to provide any
notification to the bureau of export administration or nsa.
...you do not need to provide such
notification in any case, but you may need to take other actions to comply with laws and regulations in your own country concerning encryption technologies.
... however, in an advisory opinion issued in reference to the bernstein case, the bureau of export administration (bxa) has stated the following: "concerning the posting onto a mirror or archive site of already-posted source code,
notification is required only for the initial posting." bxa and nsa have already been notified of the posting of encryption-related source code on the mozilla site, and in light of this opinion we have therefore decidednot to ask mirror sites to provide
notification themselves.
...And 3 more matches
RDF Modifications - Archive of obsolete content
there are two main situations when the
notifications are made.
...however, only one
notification is made.
...the second situation when
notifications are made is when a datasource is being loaded or reloaded.
...And 3 more matches
Limitations of chrome scripts
observers for these topics get content objects as the asubject argument to observe(), so
notifications are not sent to the chrome process.
...the subject for the observer
notification will be an nsihttpchannel as you would expect.
... a common pattern here is to use the
notificationcallbacks property of the nsihttpchannel to get the dom window that initiated the load, like this: observe: function (subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); var domwindow = httpchannel.
notificationcallbacks.getinterface(ci.nsidomwindow); } } or this: observe: function (subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); var domwindow = httpchannel.
notificationcallbacks.getinterface(ci.nsiloadcontext).associatedwindow; } } in multiprocess firefox these patterns will no longer work: the getinterface call will fail.
...And 3 more matches
Overview of Mozilla embedding APIs
in addition to memory allocation and release, this service provides low memory
notifications, called a memory pressure observers, which are notified when memory is low - thus allowing cached resources to be freed.
...the embedding application receives
notifications from gecko through a set of callback interfaces it may choose to implement.
...context menu
notifications right-click context menu
notifications are passed up to the embedding application through the nsicontextmenulistener interface.
...And 3 more matches
nsIIdleService
the observer will get an 'idle'
notification when the user is idle for that interval (or longer), and receive a 'back' (gecko 3 to 15) or 'active' (gecko 16+)
notification when the user starts using their computer again.
... the subject of the
notification the observer will get is always the nsiidleservice itself.
...the data parameter for the
notification contains the current user idle time in gecko 15 and earlier or 0 in gecko 16 and later.
...And 3 more matches
nsIMemory
if you need to monitor low memory conditions, you should watch for the low memory
notifications "memory-pressure"
notifications instead.
... low memory
notifications an nsimemory implementation may be capable of monitoring heap usage.
... moreover, a mechanism exists by which a client can receive
notifications about low-memory situations.
...And 3 more matches
Setting HTTP request headers
(in our example, our made up http header is x-hello and not hello because we correctly added the x- in front of our name.) no longer the case: http://tools.ietf.org/html/rfc6648
notifications the question that may be coming to your mind right now is, how do you get the nsihttpchannel when an http request is made.
...trapping other requests is done with
notifications, which are a lot like events or signals found in other languages and frameworks.
...(and yes, "http-on-modify-request" is a string.) note: there are many topics, besides just "http-on-modify-request", that you can get
notifications about, for example "http-on-examine-response" and "xpcom-shutdown".
...And 3 more matches
Introduction to progressive web apps - Progressive web apps (PWAs)
an app could be considered a pwa when it meets certain requirements, or implements a set of given features: works offline, is installable, is easy to synchronize, can send push
notifications, etc.
... re-engageable, so it's able to send
notifications whenever there's new content available.
... re-engaging with users through the use of system
notifications and push messages, leading to more engaged users and better conversion rates.
...And 3 more matches
Updating addons broken by private browsing changes - Archive of obsolete content
iwebbrowserpersist ff 19: nsicontentprefservice nsidownloadmanager nsidownload nsihttpauthmanager nsistricttransportsecurityservice ff 20: nsiprivatebrowsingservice nsirecentbadcertservice furthermore, if your code uses any of these common chrome apis: ff 19: saveurl saveinternal openlinkin ff 20: openbrowserwindow gprivatebrowsingui finally, if your code watches for any of these observer
notifications: private-browsing private-browsing-cancel-vote private-browsing-change-granted private-browsing-transition-complete then your addon will require updating to correctly support the new per-window private browser feature in firefox 20 (and will require updating to work correctly in releases of firefox since the ones listed).
...addprivacyawarelistener should be used instead, or no
notifications will be received for private downloads.
... there is a new download-manager-remove-download-guid
notification, which passes an nsisupportscstring subject for the guid or null.
...And 2 more matches
Introduction to the server side - Learn web development
it can even allow interaction with users of the site, sending
notifications and updates via email or through other channels.
...sending
notifications).
... a deeper analysis of user habits can be used to anticipate their interests and further customize responses and
notifications, for example providing a list of previously visited or popular locations you may want to look at on a map.
...And 2 more matches
Interfacing with the Add-on Repository
for example: searchfailed: function() { this.show
notification("i have no recommendations for you right now!", "oh noes!", null); }, here, we call a show
notification() method with some parameters that we'll look at shortly when we get to our show
notification() method below.
... for example: searchsucceeded: function(addons, addoncount, totalresults) { var num = math.floor(math.random() * addoncount); this.show
notification("would you like to try the " + addons[num].name + " addon?", "install", addons[num].install); }, this routine randomly selects one of the returned add-ons, then calls the previously mentioned show
notification() routine, passing in as parameters a prompt including the name of the returned add-on, a label for the button to show in the
notification ("install"), and the addoninstall objec...
... installing the add-on the show
notification() routine displays a
notification box offering to install the recommended add-on, if one was found, or reports an error if the search failed: show
notification: function(prompt, button, installobj) { this.install = installobj; var box = popup
notifications.show(gbrowser.selectedbrowser, "sample-popup", prompt, null, /* anchor id */ { label: button, accesskey: "i", callback: function() { if (popup
notifications.install) { popup
notifications.install.install(); } else { popup
notifications.remove(box); } } }, null /* sec...
...And 2 more matches
nsIAsyncInputStream
if the stream implements nsiasyncinputstream, then the caller can use this interface to request an asynchronous
notification when the stream becomes readable or closed (via the asyncwait() method).
...method overview void asyncwait(in nsiinputstreamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget); void closewithstatus(in nsresult astatus); constants constant value description wait_closure_only (1<<0) if passed to asyncwait(), this flag overrides the default behavior, causing the oninputstreamready
notification to be suppressed until the stream becomes closed (either as a result of closewithstatus()/close being called on the stream or possibly due to some error in the underlying stream).
...the
notification is one-shot, meaning that each asyncwait call will result in exactly one
notification callback.
...And 2 more matches
nsIAsyncOutputStream
if the stream implements nsiasyncoutputstream, then the caller can use this interface to request an asynchronous
notification when the stream becomes writable or closed (via the asyncwait() method).
...method overview void asyncwait(in nsioutputstreamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget); void closewithstatus(in nsresult reason); constants constant value description wait_closure_only (1<<0) if passed to asyncwait(), this flag overrides the default behavior, causing the onoutputstreamready
notification to be suppressed until the stream becomes closed (either as a result of closewithstatus()/close being called on the stream or possibly due to some error in the underlying stream).
...the
notification is one-shot, meaning that each asyncwait call will result in exactly one
notification callback.
...And 2 more matches
nsIMsgFolder
inputstream getofflinefilestream(in nsmsgkey msgkey, out pruint32 offset, out pruint32 size); void downloadmessagesforoffline(in nsisupportsarray messages, in nsimsgwindow window); nsimsgfolder getchildwithuri(in acstring uri, in boolean deep, in boolean caseinsensitive); void downloadallforoffline(in nsiurllistener listener, in nsimsgwindow window); void enable
notifications(in long
notificationtype, in boolean enable, in boolean dbbatching); boolean iscommandenabled(in acstring command); boolean matchorchangefilterdestination(in nsimsgfolder folder,in boolean caseinsensitive); boolean confirmfolderdeletionforfilter(in nsimsgwindow msgwindow); void alertfilterchanged(in nsimsgwindow msgwindow); void throwalertmsg(in strin...
... manyheaderstodownload boolean readonly: used to determine if it will take a long time to download all the headers in this folder - so that we can do folder
notifications synchronously instead of asynchronously.
... nsmsgdispositionstate_none -1 nsmsgdispositionstate_replied 0 nsmsgdispositionstate_forwarded 1 allmessagecount
notifications 0 turn
notifications on/off for various
notification types.
...And 2 more matches
ServiceWorkerGlobalScope - Web APIs
notificationclick occurs when a user clicks on a displayed
notification.
... also available via the serviceworkerglobalscope.on
notificationclick property.
...
notificationclose occurs — when a user closes a displayed
notification.
...And 2 more matches
Event reference
events can represent everything from basic user interactions to automated
notifications of things happening in the rendering model.
...
notificationclick
notificationevent
notifications apithe definition of 'on
notificationclick' in that specification.
... a system
notification spawned by serviceworkerregistration.show
notification() has been clicked.
...And 2 more matches
Progressive web apps (PWAs)
this guide explains how a2hs is used, and what you need to do as a developer to allow your users to take advantage of it.how to make pwas installablein this article, we learned about how we can make pwas installable with a properly-configured web manifest, and how the user can then install the pwa with the "add to home screen" feature of their browser.how to make pwas re-engageable using
notifications and pushhaving the ability to cache the contents of an app to work offline is a great feature.
...but instead of relying only on user actions, we can do more, using push messages and
notifications to automatically re-engage and deliver new content whenever it is available.introduction to progressive web appsthis article provides an introduction to progressive web apps (pwas), discussing what they are and the advantages they offer over regular web apps.making pwas work offline with service workersin this article we took a simple look at how you can make your pwa work offline with service workers.
... progressive loadingin previous articles we covered apis that help us make our js13kpwa example a progressive web app: service workers, web manifests,
notifications and push.
...And 2 more matches
Progress Listeners - Archive of obsolete content
in the examples below the progress listener is attached to the tabbrowser, which means you don't get any
notifications for inactive tabs.
...instead, you receive those events that the tabbrowser is interested in, except that the onlinkiconavailable and onrefreshattempted
notifications are optional.
... example:
notification when the value in address bar changes a commonly asked question is how to get notified whenever the url in the address bar (also known as location bar) changes.
... example: example of listener for anchor change the above example "
notification when the value in address bar changes" fires multiple times, one of which is when the tab is changed.
Intercepting Page Loads - Archive of obsolete content
http
notifications are fired for all http requests originating from firefox.
... there are 2 http topics you can listen to, as specified in the observer
notifications page: topic description http-on-modify-request called as an http request is made.
... you won't be able to make dom modifications like with the load events, since these
notifications are triggered before the response arrives and is parsed into dom tree, so this is not the best approach for the typical greasemonkey-style extensions.
... the aforementioned observer
notifications page has more information about these
notifications and links to other useful documentation.
Basics - Archive of obsolete content
log(stringstring)this method writes a
notification message to the console.
...class
notifications the
notification box appears at the bottom right corner of the browser and displays important information to the user.
...methods show(titlestringbodystringiconstring)draws a
notification box.
... titlethe head of the
notification message.string bodythe messagestringfalse iconthe url of an .ico file.string jetpack.
notifications.show("hello world");var mybody = " my first message body on jetpack";var myicon = "http://www.mozilla.com/favicon.ico";jetpack.
notifications.show({title: "my first message on jetpack", body: mybody, icon: myicon}); class tabs in this class you can find information about the tabs in your firefox window.
Theme changes in Firefox 2 - Archive of obsolete content
global/
notification.css new file; defines styles used by the
notification strip that appears at the top of browser windows to present notices such as "a popup was blocked." global/scrollbox/autorepeat-arrow-dn-dis.gif new file; icon displayed for a disabled autorepeat down arrow in a scroll box.
...
notification.css this is a new file in firefox 2.
... it is used for the
notification bar along the top of the browser that displays messages to the user such as popup blocked, or a plugin is needed and so forth.
...you should define the following styles: .messagebutton .messageclosebutton .messageimage .messagetext .
notification-inner
notification notification[type="info"]
notification[type="warning"]
notification[type="critical"] scrollbox.css the following new styles have been added to this file for firefox 2 themes: .autorepeatbutton-down[disabled="true"] .autorepeatbutton-down[orient="horizontal"] .autorepeatbutton-down[orient="horizontal"][disabled="true"] .autorepeatbutton-up[disabled="true"] .autorepeatbutton-up[orient="horizontal"] .autorepeatbutton-up[orient="horizontal"][disabled="true"] .scrollbutton-down .scrollbutton-down > .toolbarbutton-text .scrollbutton-down[disabled="true"] .scrollbutton-down[or...
DownloadList
to receive change
notifications for downloads that are added to the list, use the addview() method to register for ondownloadchanged
notifications.
...the newly added view will receive ondownloadadded
notifications for all the downloads that are already in the list.
... promise resolves to undefined when the view has been registered and all the ondownloadadded
notifications for the existing downloads have been sent.
...at this point, the removed view will not receive any more
notifications.
Necko Architecture
an nsistreamlistener is told when the uri transaction has "started," when data is available (in the case of reading data), and when it has "stopped." it is up to the nsistreamlistener implementation to decide what to do with these various
notifications.
... the ondataavailable()
notification provides a chance for the nsistreamlistener to actually retrieve data that the channel has acquired.
... one of the arguments to the ondataavailable()
notification is an nsiinputstream (which can be considered the underlying data).
...the transaction is not complete until you receive an "stopped"
notification.
Querying Places
notifications sent to the result from the history and bookmarks system, as well as commands executed by the programmer such as sorting may cause the structure to change and nodes may be inserted, removed, or replaced.
...this viewer will be called when the result tree changes, either as a result of user action or as a result of
notifications from the bookmarks and history systems.
...while a container is open, it will listen to the history and bookmarks systems'
notifications and modify their contents to keep themselves up-to-date.
...if you close a container and re-open it before any history or bookmark change
notifications come, the results will generally still be there and this operation will be fast.
XPCOM changes in Gecko 2.0
category registration prior to gecko 2, extensions could listen for the xpcom-startup and app-startup
notifications during startup, and perform actions during those.
...the earliest startup
notification extensions can receive now is profile-after-change, which has always been the recommended
notification to observe.
... that's because it's among the earliest
notifications that occurs after the profile folder (and therefore preferences and other services) is available.
...see receiving startup
notifications for details.
mozISpellCheckingEngine
when this attribute's value is changed, a "spellcheck-dictionary-update"
notification is sent.
... when this changes, the spell checker sends a "spellcheck-dictionary-update"
notification.
...when this changes, the spell checker sends a "spellcheck-dictionary-update"
notification.
...when this changes, the spell checker sends a "spellcheck-dictionary-update"
notification.
nsICookieService
var cookiesvc = components.classes["@mozilla.org/cookieservice;1"] .getservice(components.interfaces.nsicookieservice);
notifications this service broadcasts the following
notifications when the cookie list is changed, or a cookie is rejected: topic subject data cookie-changed broadcast whenever the cookie list changes in some way.
... there are four possible data strings for this
notification; one
notification will be broadcast for each change.
... aprompt the prompt to use for all user-level cookie
notifications.
... aprompt the prompt to use for all user-level cookie
notifications.
nsIHttpActivityDistributor
tributor;1 as a service: var httpactivitydistributor = components.classes["@mozilla.org/network/http-activity-distributor;1"] .getservice(components.interfaces.nsihttpactivitydistributor); method overview void addobserver(in nsihttpactivityobserver aobserver); void removeobserver(in nsihttpactivityobserver aobserver); methods addobserver() begins delivery of
notifications of http transport activity.
... void addobserver( in nsihttpactivityobserver aobserver ); parameters aobserver the nsihttpactivityobserver that should receive
notifications of http transport activity; this object's nsihttpactivityobserver.observeactivity() method will be called each time activity occurs.
... removeobserver() stops delivery of
notifications of http transport activity.
... void removeobserver( in nsihttpactivityobserver aobserver ); parameters aobserver the nsihttpactivityobserver that should no longer receive
notifications of http transport activity.
nsILoadGroup
notificationcallbacks nsiinterfacerequestor
notification callbacks for the load group.
... acontext the context to be passed to the onstartrequest
notification.
... acontext the context to be passed to the onstoprequest
notification.
... astatus the status to be passed to the onstoprequest
notification.
nsIMemoryReporterManager
registermultireporter() requests that memory multi-reporter
notifications be sent to the specified objects.
... registerreporter() requests that memory reporter
notifications be sent to the specified objects.
... unregistermultireporter() stops sending memory multi-reporter
notifications to the specified object.
... unregisterreporter() stops sending memory reporter
notifications to the specified object.
nsINavBookmarkObserver
other
notifications will be sent during the batch change, but the observer is guaranteed that onendupdatebatch() will be called at the completion of changes.
... during a batch the observer should do its best to reduce the work done to handle
notifications, since multiple changes are going to happen in a short timeframe.
...when a new item is created, all the items following it in the same folder will have their index shifted down, but no additional
notifications will be sent.
...when an item is removed, all the items following it in the same folder will have their index shifted down, but no additional
notifications will be sent.
nsIWebProgressListener2
bprogresslistener method overview void onprogresschange64(in nsiwebprogress awebprogress, in nsirequest arequest, in long long acurselfprogress, in long long amaxselfprogress, in long long acurtotalprogress, in long long amaxtotalprogress); boolean onrefreshattempted(in nsiwebprogress awebprogress, in nsiuri arefreshuri, in long amillis, in boolean asameuri); methods onprogresschange64()
notification that the progress has changed for one of the requests associated with awebprogress.
...void onprogresschange64( in nsiwebprogress awebprogress, in nsirequest arequest, in long long acurselfprogress, in long long amaxselfprogress, in long long acurtotalprogress, in long long amaxtotalprogress ); parameters awebprogress the nsiwebprogress instance that fired the
notification.
... onrefreshattempted()
notification that a refresh or redirect has been requested in awebprogress.
...boolean onrefreshattempted( in nsiwebprogress awebprogress, in nsiuri arefreshuri, in long amillis, in boolean asameuri ); parameters awebprogress the nsiwebprogress instance that fired the
notification.
Mail and RDF
notification: folder data changes.
... an aside: rational behind the design after reviewing this design, it might seem unnecessary to have the double-levels of
notification/registration.
... there should be a non-rdf mechanism for folder change
notification.
... there are times (for example, from javascript/xul) where we want folder
notifications that have nothing to do with rdf.
Using js-ctypes
the below will do the same as standardalert from above, it will use the core foundation function of cfuser
notificationdisplaynotice.
....long; var void = ctypes.void_t; var __cfstring = new ctypes.structtype("__cfstring"); var cfstringref = __cfstring.ptr; var __cfurl = new ctypes.structtype("__cfurl"); var cfurlref = __cfurl.ptr; var __cfallocator = new ctypes.structtype("__cfallocator"); var cfallocatorref = __cfallocator.ptr; var unichar = ctypes.jschar; // uint16 with automatic conversion // define constants var kcfuser
notificationstopalertlevel = 0; var kcfuser
notificationnotealertlevel = 1; var kcfuser
notificationcautionalertlevel = 2; var kcfuser
notificationplainalertlevel = 3; // declare functions /* https://developer.apple.com/library/mac/documentation/corefoundation/reference/cfuser
notificationref/index.html#//apple_ref/c/func/cfuser
notificationdisplaynotice * sint32 cfuser
notificationdisplaynotice ( * cftimeinte...
...rval timeout, * cfoptionflags flags, * cfurlref iconurl, * cfurlref soundurl, * cfurlref localizationurl, * cfstringref alertheader, * cfstringref alertmessage, * cfstringref defaultbuttontitle * ); */ var cfuser
notificationdisplaynotice = libcf.declare("cfuser
notificationdisplaynotice", ctypes.default_abi, sint32, // return cftimeinterval, // timeout cfoptionflags, // flags cfurlref, // iconurl cfurlref, // soundurl cfurlref, // localizationurl cfstringref, // alertheader cfstringref, // alertmessage cfstringref // defaultbuttontitle ); /* https://developer.apple.com/library/mac/documentation/corefoundation/reference/cftyperef/#//apple_ref/c/func/cfrelease * void cfrelease ( * cftyperef cf * ); */ var cfrelease = libcf.declare('cfrelease', ctypes.
...unction makecfstr(jsstr) { // js str is just a string // returns a cfstr that must be released with cfrelease when done return cfstringcreatewithcharacters(null, jsstr, jsstr.length); } // main var mycfstrs = { head: makecfstr('core foundation says...'), body: makecfstr('we just called the equivalent of the "standardalert carbon function" for 64bit osx from javascript!') }; var rez = cfuser
notificationdisplaynotice(0, kcfuser
notificationcautionalertlevel, null, null, null, mycfstrs.head, mycfstrs.body, null); console.info('rez:', rez, rez.tostring(), uneval(rez)); // cfuser
notificationdisplaynotice does not block till user clicks dialog, it will return immediately if (rez.tostring() == '0') { console.log('
notification was succesfully shown!!'); } else { console.error('failed to show no...
BluetoothRemoteGATTCharacteristic - Web APIs
value; promise<bluetoothremotegattdescriptor> getdescriptor(bluetoothdescriptoruuid descriptor); promise<sequence<bluetoothremotegattdescriptor>> getdescriptors(optional bluetoothdescriptoruuid descriptor); promise<dataview> readvalue(); promise<void> writevalue(buffersource value); promise<void> start
notifications(); promise<void> stop
notifications(); }; bluetoothremotegattcharacteristic implements eventtarget; bluetoothremotegattcharacteristic implements characteristiceventhandlers; properties bluetoothremotegattcharacteristic.serviceread only returns the bluetoothgattservice this characteristic belongs to.
...this value gets updated when the value of the characteristic is read or updated via a
notification or indication.
... bluetoothremotegattcharacteristic.start
notifications() returns a promise when navigator.bluetooth is added to the active
notification context.
... bluetoothremotegattcharacteristic.stop
notifications() returns a promise when navigator.bluetooth is removed from the active
notification context.
Clients.openWindow() - Web APIs
in firefox, the method is allowed to show popups only when called as the result of a
notification click event.
... examples // send
notification to os if applicable if (self.
notification.permission === 'granted') { const
notificationobject = { body: 'click here to view your messages.', data: { url: self.location.origin + '/some/path' }, // data: { url: 'http://example.com' }, }; self.registration.show
notification('you\'ve got messages!',
notificationobject); } //
notification click event listener self.addeventlistener('...
...
notificationclick', e => { // close the
notification popout e.
notification.close(); // get all the window clients e.waituntil(clients.matchall({ type: 'window' }).then(clientsarr => { // if a window tab matching the targeted url already exists, focus that; const hadwindowtofocus = clientsarr.some(windowclient => windowclient.url === e.
notification.data.url ?
... if (!hadwindowtofocus) clients.openwindow(e.
notification.data.url).then(windowclient => windowclient ?
Permissions.query() - Web APIs
firefox for example currently supports geolocation,
notifications, push, and persistent-storage (see our permissions.webidl file).
... uservisibleonly: (push only, not supported in firefox — see the browser support section below) indicates whether you want to show a
notification for every message or be able to send silent push
notifications.
... note: as of firefox 44, the permissions for
notifications and push have been merged.
...by the user, in the relevant permissions dialog), navigator.permissions.query() will return true for both
notifications and push.
Permissions.revoke() - Web APIs
valid values are 'geolocation', 'midi', '
notifications', and 'push'.
... uservisibleonly: (push only, not supported in firefox — see the browser compatibility section below) indicates whether you want to show a
notification for every message or be able to send silent push
notifications.
... note: as of firefox 44, the permissions for
notifications and push have been merged.
...by the user, in the relevant permissions dialog), navigator.permissions.query() will return true for both
notifications and push.
WebRTC connectivity - Web APIs
at the end of each generation of candidates, an end-of-candidates
notification is sent in the form of an rtcicecandidate whose candidate property is an empty string.
... this candidate should still be added to the connection using addicecandidate() method, as usual, in order to deliver that
notification to the remote peer.
... when there are no more candidates at all to be expected during the current negotiation exchange, an end-of-candidates
notification is sent by delivering a rtcicecandidate whose candidate property is null.
...it's a legacy
notification of a state which can be detected instead by watching for the icegatheringstate to change to complete, by watching for the icegatheringstatechange event.
Progressive web app structure - Progressive web apps (PWAs)
in addition to the basic shell, you can add other features such as add to home screen or push
notifications, safe in the knowledge that the app will still work ok if they are not supported by the user's browser — this is the beauty of progressive enhancement.
...you can <a href="https://github.com/mdn/pwa-examples/blob/master/js13kpwa">fork js13kpwa on github</a> to check its source code.</p> <button id="
notifications">request dummy
notifications</button> <section id="content"> // content inserted in here </section> </main> <footer> <p>© js13kgames 2012-2018, created and maintained by <a href="http://end3r.com">andrzej mazur</a> from <a href="http://enclavegames.com">enclave games</a>.</p> </footer> </body> </html> the <head> section contains some basic info like title, description and links to css, we...
...e/g,games[i].website) .replace(/github/g,games[i].github); entry = entry.replace('<a href=\'http:///\'></a>','-'); content += entry; }; document.getelementbyid('content').innerhtml = content; next, it registers a service worker: if('serviceworker' in navigator) { navigator.serviceworker.register('/pwa-examples/js13kpwa/sw.js'); }; the next code block requests permission for
notifications when a button is clicked: var button = document.getelementbyid("
notifications"); button.addeventlistener('click', function(e) {
notification.requestpermission().then(function(result) { if(result === 'granted') { random
notification(); } }); }); the last block creates
notifications that display a randomly-selected item from the games list: function randomnoti...
...fication() { var randomitem = math.floor(math.random()*games.length); var notiftitle = games[randomitem].name; var notifbody = 'created by '+games[randomitem].author+'.'; var notifimg = 'data/img/'+games[randomitem].slug+'.jpg'; var options = { body: notifbody, icon: notifimg } var notif = new
notification(notiftitle, options); settimeout(random
notification, 30000); } the service worker the last file we will quickly look at is the service worker: sw.js — it first imports data from the games.js file: self.importscripts('data/games.js'); next, it creates a list of all the files to be cached, both from the app shell and the content: var cachename = 'js13kpwa-v1'; var appshellfiles = [ '/pwa-examples/js13kpwa/', '/pwa-examples/js13kpwa/index.html'...
Structural overview of progressive web apps - Progressive web apps (PWAs)
in addition to the basic shell, you can add other features such as add to home screen or push
notifications, safe in the knowledge that the app will still work ok if they are not supported by the user's browser — this is the beauty of progressive enhancement.
...you can <a href="https://github.com/mdn/pwa-examples/blob/master/js13kpwa"> fork js13kpwa on github</a> to check its source code.</p> <button id="
notifications">request dummy
notifications</button> <section id="content"> // content inserted in here </section> </main> <footer> <p>© js13kgames 2012-2018, created and maintained by <a href="http://end3r.com"> andrzej mazur</a> from <a href="http://enclavegames.com">enclave games</a>.</p> </footer> </body> </html> the <head> section contains basic information about the app, including its titl...
... .replace(/github/g,games[i].github); entry = entry.replace('<a href=\'http:///\'></a>','-'); content += entry; }; document.getelementbyid('content').innerhtml = content; then it registers a service worker: if ("serviceworker" in navigator) { navigator.serviceworker.register("/pwa-examples/js13kpwa/sw.js"); } after that, the app adds a handler for clicks on a button whose id is
notifications; this handler requests permission to send
notifications to the user, then generates and sends a random
notification.
... var button = document.getelementbyid("
notifications"); button.addeventlistener('click', function(e) {
notification.requestpermission().then(function(result) { if (result === 'granted') { random
notification(); } }); }); the random
notification() function follows, rounding out the last of the code in the file: function random
notification() { var randomitem = math.floor(math.random()*games.length); var notiftitle = games[randomitem].name; var notifbody = 'created by '+games[randomitem].author+'.'; var notifimg = 'data/img/'+games[randomitem].slug+'.jpg'; var options = { body: notifbody, icon: notifimg } var notif = new
notification(notiftitle, options); settimeout(random
notification, 30000); } the service worker the last file we'll briefly look at here i...
Supporting private browsing mode - Archive of obsolete content
private browsing
notifications there are
notifications available that allow you to easily watch for changes to the status of the private browsing mode, including detecting when it turns on and off.
... in addition, there is a browser:purge-session-history
notification that is sent when the browser purges private data that extensions can watch in order to know when it's time to do the same.
... to do this, simply watch for the private browsing private-browsing-cancel-vote
notification with the subject "exit", and set its data field to true to cancel the operation, like this: var os = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); os.addobserver(function (asubject, atopic, adata) { asubject.queryinterface(components.interfaces.nsisupportsprbool); // if another extension has not already canc...
Methods - Archive of obsolete content
« xul reference home acceptdialog additemtoselection addpane addprogresslistener addsession addtab addtabsprogresslistener advance advanceselectedtab appendcustomtoolbar appendgroup appenditem append
notification blur cancel canceldialog centerwindowonscreen checkadjacentelement clearresults clearselection click close collapsetoolbar contains decrease decreasepage docommand ensureelementisvisible ensureindexisvisible ensureselectedelementisvisible expandtoolbar extra1 extra2 focus getbrowseratindex getbrowserfordocument getbrowserfortab getbrowserindexfordocument getbutton getdefaultsession geteditor getelementsbyattribute getelementsbyattributens getformattedstring gethtmleditor getindexoffirstvisible...
...row getindexofitem getitematindex getnextitem get
notificationbox get
notificationwithvalue getnumberofvisiblerows getpagebyid getpreviousitem getresultat getresultcount getresultvalueat getrowcount getsearchat getselecteditem getsession getsessionbyname getsessionresultat getsessionstatusat getsessionvalueat getstring goback gobackgroup godown goforward goforwardgroup gohome goto gotoindex goup hidepopup increase increasepage insertitem insertitemat invertselection loadgroup loadonetab loadtabs loaduri loaduriwithflags makeeditable movebyoffset moveto movetoalertposition onsearchcomplete ontextentered ontextreverted openpopup openpopupatscreen opensubdialog openwindow preferenceforelement reload ...
...reloadalltabs reloadtab reloadwithflags removeallitems removeall
notifications removealltabsbut removecurrent
notification removecurrenttab removeitemat removeitemfromselection remove
notification removeprogresslistener removesession removetab removetabsprogresslistener removetransient
notifications replacegroup reset rewind scrollbyindex scrollbypixels scrolltoindex select selectall selectitem selectitemrange selecttabatindex setselectionrange showpane showpopup sizeto startediting stop stopediting swapdocshells syncsessions timedselect toggleitemselection related dom element methods dom:element.addeventlistener dom:element.appendchild dom:element.comparedocumentposition dom:element.dispatchevent dom:element.getattribut...
XUL accessibility guidelines - Archive of obsolete content
use scripting or the
notificationbox element to flag alerts.
... alerts alerts are displayed using the alert scripting function or the
notificationbox element.
... alerts are conveyed visually or audibly, or use a method other than the alert scripting function or the
notificationbox element.
SAX - Archive of obsolete content
the following handlers are available: interface purpose nsisaxcontenthandler receive
notification of the logical content of a document (e.g.
... nsisaxdtdhandler receive
notification of basic dtd-related events.
... nsisaxerrorhandler receive
notification of errors in the input stream.
Performance
le.jsm") // getmaincopy() used by other functions don't register observers (and other callbacks to global services) in a frame script bad: //framescript.js services.obs.addobserver("document-element-inserted", { observe: function(doc, topic, data) { if(doc.ownerglobal.top != content) return; // bail out if this is for another tab decoratedocument(doc); } }) observer
notifications get fired for events that happen anywhere in the browser, they are not scoped to the current tab.
... better: content-document-global-created
notifications can be substituted with domwindowcreated events other observers and services should be registered in a process script or jsm instead load frame scripts on demand bad: // addon.js services.mm.loadframescript("framescript.js", /*delayed:*/ true) // stuff communicating with the framescript // framescript.js function onlyonceinabluemoon() { // we only need this during a total solar ec...
...er: // addon.js function onunload() { services.mm.removedelayedframescript("resources://my-addon/framescript.js"); services.ppmm.removedelayedprocessscript("resources://my-addon/processcript.js"); services.mm.broadcastasyncmessage("my-addon:unload"); services.ppmm.broadcastasyncmessage("my-addon:unload"); } in the frame/process scripts: remove all kinds of listeners remove observer
notifications remove custom categories and services nuke sandboxes unload jsms restore content dom states where necessary, e.g.
CustomizableUI.jsm
otherwise, this will fire an onwidgetadded
notification, and an onwidgetbeforedomchange and onwidgetafterdomchange
notification for each window customizableui knows about.
... otherwise, this will fire an onwidgetremoved
notification, and an onwidgetbeforedomchange and onwidgetafterdomchange
notification for each window customizableui knows about.
... otherwise, this will move the widget and fire an onwidgetmoved
notification, and an onwidgetbeforedomchange and onwidgetafterdomchange
notification for each window customizableui knows about.
DownloadSummary
the newly added view will receive an initial onsummarychanged
notification.
... promise resolves to undefined when the view has been registered and the onsummarychanged
notification has been sent.
...at this point, the removed view will not receive any more
notifications.
PR_CWait
wait for a
notification that a monitor's state has changed.
... timeout the amount of time (in printervaltime units) that the thread is willing to wait for an explicit
notification before being rescheduled.
... description using the value specified in the address parameter to find a monitor in the monitor cache, pr_cwait waits for a
notification that the monitor's state has changed.
PR_Notify
description
notification of a monitor signals the change of state of some monitored data.
... the changing of that data and the
notification must all be performed while in the monitor.
... when the
notification occurs, the runtime promotes a thread that is waiting on the monitor to a ready state.
Finishing the Component
ns_impl_isupports3(weblock, nsiobserver, iweblock, nsicontentpolicy); receiving
notifications to receive
notifications, you must register as a new category.
... you have already registered as a category to receive startup
notification.
... "weblock", weblock_contractid, pr_true, pr_true, &previous); if (previous) nsmemory::free(previous); return rv; } this code adds a new category entry under the topic "content-policy," and it calls addcategoryentry in the same way we did in registering for
notifications.
nsINavHistoryResult
the viewer provides
notifications to the controller when view events occur; this is done using the nsinavhistoryresultviewobserver interface.
... suppress
notifications boolean if true,
notifications are suppressed.
...void addobserver( in nsinavhistoryresultobserver aobserver, in boolean aownsweak ); parameters aobserver an object that implements the nsinavhistoryresultobserver interface, which will receive
notifications of changes on the result.
Component; nsIPrefBranch
the list of registered observers may be changed during the dispatch of nspref:changed
notification.
... however, the observers are not guaranteed to be notified in any particular order, so you can't be sure whether the added/removed observer will be called during the
notification when it is added/removed.
... it is possible to change preferences during the
notification.
nsIPrefBranch2
the list of registered observers may be changed during the dispatch of nspref:changed
notification.
... however, the observers are not guaranteed to be notified in any particular order, so you can't be sure whether the added/removed observer will be called during the
notification when it is added/removed.
... it is possible to change preferences during the
notification.
nsIProgressEventSink
an implementation of this interface can be passed to a channel via the channel's
notificationcallbacks attribute.
...the channel will begin passing
notifications to the progress event sink after its asyncopen method has been called.
...
notifications will cease once the channel calls its listener's onstoprequest method or once the channel is canceled (via nsirequest.cancel()).
nsIPushService
} ); receiving push messages subscriptions created from privileged code use xpcom observer
notifications instead of service worker events.
... you can use the global nsiobserverservice to listen for these
notifications.
...if the subscription is lost, and your code isn't listening for this
notification, you won't be able to receive messages until you create a new subscription.
nsIRequest
load_background 1 << 0 do not deliver status
notifications to the nsiprogresseventsink, or keep this load from completing the nsiloadgroup it may belong to.
... implementations must not send any
notifications (for example via nsirequestobserver) synchronously from this function.
... calling cancel() on a suspended request must not send any
notifications (such as onstoprequest) until the request is resumed.
nsISocketTransportService
ahandler socket handler that will receive
notifications when the socket is ready or detached.
...the
notification is asynchronous, delivered via the given nsirunnable instance on the socket transport thread.
... void notifywhencanattachsocket( in nsirunnable aevent ); parameters aevent event that will receive the
notification when a new socket can be attached.
nsIThreadPool
a listener will only receive
notifications about threads created after the listener is set so it is recommended that the consumer set the listener before dispatching the first event.
... a listener that receives an nsithreadpoollistener.onthreadcreated()
notification is guaranteed to always receive the corresponding nsithreadpoollistener.onthreadshuttingdown()
notification.
...threads created after the listener is set will also take ownership of the listener so that the listener will be kept alive long enough to receive the guaranteed nsithreadpoollistener.onthreadshuttingdown()
notification.
nsIThreadPoolListener
the nsithreadpoollistener interface represents objects that listen to
notifications generated by the nsithreadpool.
...the
notification happens on the newly created thread.
...the
notification happens on the thread that is about to be destroyed.
nsITransport
void seteventsink( in nsitransporteventsink asink, in nsieventtarget aeventtarget ); parameters asink receives transport layer
notifications.
... aeventtarget indicates the event target to which the
notifications should be delivered.
... if null, then the
notifications may occur on any thread.
nsIWebProgress
a nsiwebprogresslistener instance receives
notifications for the nsiwebprogress instance to which it added itself, and it may also receive
notifications from any nsiwebprogress instances that are children of that nsiwebprogress instance.
... notify_all 0x000000ff <= gecko 1.8.1 0x000001ff > gecko 1.8.1 this flag enables all
notifications.
...anotifymask the types of
notifications to receive.
XPCOM Interface Reference
e2nsicookieacceptdialognsicookieconsentnsicookiemanagernsicookiemanager2nsicookiepermissionnsicookiepromptservicensicookieservicensicookiestoragensicrashreporternsicryptohmacnsicryptohashnsicurrentcharsetlistenernsicyclecollectorlistenernsidbchangelistenernsidbfolderinfonsidnslistenernsidnsrecordnsidnsrequestnsidnsservicensidomcanvasrenderingcontext2dnsidomchromewindownsidomclientrectnsidomdesktop
notificationnsidomdesktop
notificationcenternsidomelementnsidomeventnsidomeventgroupnsidomeventlistenernsidomeventtargetnsidomfilensidomfileerrornsidomfileexceptionnsidomfilelistnsidomfilereadernsidomfontfacensidomfontfacelistnsidomgeogeolocationnsidomgeopositionnsidomgeopositionaddressnsidomgeopositioncallbacknsidomgeopositioncoordsnsidomgeopositionerrornsidomgeopositionerrorcallbacknsidomgeopositionoptionsns...
...idomglobalpropertyinitializernsidomhtmlaudioelementnsidomhtmlformelementnsidomhtmlmediaelementnsidomhtmlsourceelementnsidomhtmltimerangesnsidomjswindownsidommousescrolleventnsidommoznetworkstatsnsidommoznetworkstatsdatansidommoznetworkstatsmanagernsidommoztoucheventnsidomnshtmldocumentnsidomnavigatordesktop
notificationnsidomnodensidomofflineresourcelistnsidomorientationeventnsidomparsernsidomprogresseventnsidomserializernsidomsimplegestureeventnsidomstoragensidomstorage2nsidomstorageeventobsoletensidomstorageitemnsidomstoragelistnsidomstoragemanagernsidomstoragewindownsidomuserdatahandlernsidomwindownsidomwindow2nsidomwindowinternalnsidomwindowutilsnsidomxpathevaluatornsidomxpathexceptionnsidomxpathexpressionnsidomxpathresultnsidomxulcontrolelementnsidomxulelementnsidomxullabeledcontrolelementnsidomxu...
...tspruint32nsisupportspruint64nsisupportsprimitivensisupportsprioritynsisupportsstringnsisupportsvoidnsisupportsweakreferencensisyncjpakensisyncmessagesendernsitxttohtmlconvnsitaggingservicensitaskbarpreviewnsitaskbarpreviewbuttonnsitaskbarpreviewcontrollernsitaskbarprogressnsitaskbartabpreviewnsitaskbarwindowpreviewnsitelemetrynsitextinputprocessornsitextinputprocessorcallbacknsitextinputprocessor
notificationnsithreadnsithreadeventfilternsithreadinternalnsithreadmanagernsithreadobservernsithreadpoolnsithreadpoollistenernsitimernsitimercallbacknsitoolkitnsitoolkitprofilensitoolkitprofileservicensitraceablechannelnsitransactionnsitransactionlistnsitransactionlistenernsitransactionmanagernsitransferablensitransportnsitransporteventsinknsitransportsecurityinfonsitreeboxobjectnsitreecolumnnsitreecolumnsnsi...
Mail composition back end
ns_imethod onstartsending(const char *amsgid, - the message id for the message being sent pruint32 amsgsize) = 0; - the total message size for the message being sent onprogress the onprogress interface is called with progress
notification on the send operation.
... ns_imethod onstartcopy( nsisupports *listenerdata) = 0; - the nsisupports pointer passed in to the original copy operation onprogress the onprogress interface is called with progress
notification for the copy operation.
... ns_imethod onstartsending( pruint32 atotalmessagecount) = 0; - the total messages to be sent createandsendmessage the onprogress interface is called with progress
notification of the send later operation.
Mozilla
using popup
notifications popup
notifications, also known as "doorhanger
notifications", are presented to notify the user of something that's important but may not need immediate attention.
... these non-modal
notifications let the user make decisions when they have a moment to do so, instead of being forced to deal with them at possibly inconvenient times.
... for example, this popup
notification is displayed when a web site requests geolocation information: using raii classes in mozilla raii classes are useful when two operations (e.g., lock/unlock, addref/release, pushstate/popstate) must be paired.
URLs - Plugins
if the browser cannot locate the url and retrieve the data, it does not create a stream for the instance; in this case, the plug-in receives
notification of the result.
... to request a stream and receive
notification of the result in all cases, use npn_geturlnotify.
...without this
notification, the plug-in cannot tell whether a request with a null target failed or a request with a non-null target was completed.
about:debugging (before Firefox 68) - Firefox Developer Tools
workers the workers page shows your workers, categorised as follows: all registered service workers all registered shared workers other workers, including chrome workers and dedicated workers you can connect the developer tools to each worker, and send push
notifications to service workers.
... to debug push
notifications, you can set a breakpoint in the push event listener.
... however, you can also debug push
notifications locally, without needing the server.
about:debugging - Firefox Developer Tools
workers the workers section shows all the workers you've got registered on your firefox, categorised as follows: all registered service workers all registered shared workers other workers, including chrome workers and dedicated workers you can connect the developer tools to each worker, and send push
notifications to service workers.
... sending push events to service workers to debug push
notifications, you can set a breakpoint in the push event listener.
... however, you can also debug push
notifications locally, without needing the server.
BluetoothCharacteristicProperties - Web APIs
notifyread only returns a boolean that is true if
notifications of the characteristic value without acknowledgement is permitted.
... examples the following example shows how tell if a gatt characteristic supports value change
notifications.
...it device.gatt.connect(); let service = await gatt.getprimaryservice('heart_rate'); let characteristic = await service.getcharacteristic('heart_rate_measurement'); if (characteristic.properties.notify) { characteristics.addeventlistener('characteristicvaluechanged', function(event) { console.log(`received heart rate measurement: ${event.target.value}`); } await characteristic.start
notifications(); } specifications specification status comment web bluetooththe definition of 'bluetoothcharacteristicproperties' in that specification.
MediaSession.setActionHandler() - Web APIs
these actions let a web app receive
notifications when the user engages a device's built-in physical or onscreen media controls, such as play, stop, or seek buttons.
... let skiptime = 10; // time to skip in seconds navigator.mediasession.setactionhandler('seekforward', evt => { // user clicked "seek forward" media
notification icon.
... audio.currenttime = math.min(audio.currenttime + skiptime, audio.duration); }); navigator.mediasession.setactionhandler('seekbackward', evt => { // user clicked "seek backward" media
notification icon.
MutationObserver - Web APIs
methods disconnect() stops the mutationobserver instance from receiving further
notifications until and unless observe() is called again.
... observe() configures the mutationobserver to begin receiving
notifications through its callback function when dom changes matching the given options occur.
... takerecords() removes all pending
notifications from the mutationobserver's
notification queue and returns them in a new array of mutationrecord objects.
ServiceWorkerRegistration - Web APIs
serviceworkerregistration.get
notifications() returns a promise that resolves to an array of
notification objects.
... serviceworkerregistration.show
notification() displays the
notification with the requested title.
...
notifications api living standard adds the show
notification() method and the get
notifications() method.
Testing media queries programmatically - CSS: Cascading Style Sheets
once you've created a mediaquerylist object, you can check the result of the query or receive
notifications when the result changes.
...hmedia("(orientation: portrait)"); checking the result of a query once you've created your media query list, you can check the result of the query by looking at the value of its matches property: if (mediaquerylist.matches) { /* the viewport is currently in portrait orientation */ } else { /* the viewport is not currently in portrait orientation, therefore landscape */ } receiving query
notifications if you need to be aware of changes to the evaluated result of the query on an ongoing basis, it's more efficient to register a listener than to poll the query's result.
... ending query
notifications to stop receiving
notifications about changes to the value of your media query, call removelistener() on the mediaquerylist, passing it the name of the previously-defined callback function: mediaquerylist.removelistener(handleorientationchange); ...
Navigator - Archive of obsolete content
navigator.moz
notificationprovides support for creating
notification objects, which are used to display desktop
notification alerts to the user.
...see displaying
notifications for an example.
/loader - Archive of obsolete content
it is used as a subject for observer
notification to allow use of the observer service for defining hooks reacting on the unload of a specific loader.
... unload(loader, 'disable'); calls to this function will dispatch the unload observer
notification that modules can listen to as described above.
dev/panel - Archive of obsolete content
if an actor can send
notifications, as in the request/reply/notify pattern, then the corresponding volcan.js object emits an event, which you can listen for using addeventlistener.
... any data sent with the
notification is available to the event listener in the event.data property.
platform/xpcom - Archive of obsolete content
for example, the add-on below implements the nsiobserver interface to listen for and log all topic
notifications: var { class } = require('sdk/core/heritage'); var { unknown } = require('sdk/platform/xpcom'); var { cc, ci } = require('chrome') var observerservice = cc['@mozilla.org/observer-service;1'].
...r a component, construct a service, giving it: a constructor for the object implementing the service a contract id and/or a class id var service = service({ contract: contractid, component: alertservice }); after this, xpcom users can access the service implementation by supplying the contract id: var alertservice = cc[contractid].getservice(ci.nsialertsservice); alertservice.showalert
notification(...); the service interface is identical to the factory interface, so refer to the factory interface documentation for details.
Listening to events in Firefox extensions - Archive of obsolete content
types of events there are multiple types of events that application and extension authors can use to receive
notifications from <xul:browser> and <xul:tabbrowser> elements to hear about changes relating to loads of the content contained within them.
...it is used to update the ui for many different reasons: update the progress bar and status messages as pages load turn on and off the throbber as pages load set the site icon when available update the address bar as the user navigates hide
notification bars when appropriate as the user navigates apply the site zoom preferences to newly loading pages update the bookmarking star button ui update the identity display as the site's security changes tabsprogresslistener this object is a tabs progress listener and receives events for all browsers in the window.
Session store API - Archive of obsolete content
starting in firefox 3.5,
notifications are sent after reading session store data and before using it, as well as immediately before writing it back to disk.
... see the list in observer
notifications.
Adding preferences to an extension - Archive of obsolete content
var stockwatcher = { prefs: null, tickersymbol: "", // initialize the extension startup: function() { // register to receive
notifications of preference changes this.prefs = components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefservice) .getbranch("extensions.stockwatcher2."); this.prefs.addobserver("", this, false); this.tickersymbol = this.prefs.getcharpref("symbol").touppercase(); this.refreshinformation(); window.setinterval(this.refreshin...
... the next step is to register a preference observer by calling the addobserver() method to establish that whenever any events occur on the preferences, our object (this) receives
notification.
Layout System Overview - Archive of obsolete content
for example, the presentation shell receives
notifications of document load events, which are used to trigger updates to the formatting of the frames in some cases.
... the presentation shell also receives
notifications about changes in cursor and focus states, whereby the selection and caret updates can be made visible.
JavaScript Client API - Archive of obsolete content
getting your tracker to track changes in the underlying data is probably easiest to do if you register your tracker as an observer, so that it can receive
notifications from one or more mozilla components.
...however, "weave:service:ready" is issued after the "weave:engine:start-tracking" observer
notification.
Menu - Archive of obsolete content
sn't do anything: jetpack.menu.add("two drink holders and a captain's chair"); add a menuitem to the jetpack menu that displays the current date and time each time it's opened: jetpack.menu.add(function () new date().tostring()); click an item in the jetpack menu to be notified of the current date and time: jetpack.menu.add({ label: "show current date and time", command: function () jetpack.
notifications.show(new date()) }); the same, except on the content context menu: jetpack.menu.context.page.add({ label: "show current date and time", command: function () jetpack.
notifications.show(new date()) }); create a submenu within the content context menu.
...note that the submenu contains many items, including a menu separator: jetpack.menu.context.page.add({ label: "ice cream", icon: "http://example.com/ice-cream.png", menu: new jetpack.menu(["vanilla", "chocolate", "pistachio", null, "none"]), command: function (menuitem) jetpack.
notifications.show(menuitem.label) }); add an item to the hyperlink context menu that tweets the link: jetpack.menu.context.page.on("a").add(function (context) { return { label: "tweet", command: function () jetpack.lib.twitter.statuses.update({ status: context.node.href }) }; )); add an item to the page's context menu depending on some complex criteria that can't be completely expressed via a css selector: jetpack.menu.context.page.bef...
persistence - Archive of obsolete content
« xul reference home persistence type: integer the persistence may be set to a non-zero value so that the
notificationbox's removetransient
notifications method does not remove them.
... this may be used to close a set of
notifications as a group without affecting other
notifications.
priority - Archive of obsolete content
« xul reference home priority type: integer numeric value that specifies the order in which the
notifications appear.
... should be one of the constants described in the
notificationbox's append
notification method.
Property - Archive of obsolete content
« xul reference accessible accessibletype accesskey align all
notifications allowevents alwaysopenpopup amindicator applocale autocheck autofill autofillaftermatch boxobject browsers builder builderview buttons canadvance cangoback cangoforward canrewind checked checkstate child children classname clickselectsall clientheight clientwidth collapsed color columns command commandmanager completedefaultindex container contentdocument contentprincipal contenttitle contentview contentvieweredit contentviewerfile contentwindow contextmenu control controller controllers crop current currentindex currentitem current
notification currentpage currentpane currentset currenturi customtoolbarc...
...k ispm issearching iswaiting itemcount label labelelement lastpermanentchild lastselected left linkedpanel listboxobject locked markupdocumentviewer max maxheight maxlength maxrows maxwidth menu menuboxobject menupopup min minheight minresultsforpopup minwidth minute minuteleadingzero mode month monthleadingzero name next nomatch
notificationshidden object observes onfirstpage onlastpage open ordinal orient pack pagecount pageid pageincrement pageindex pagestep parentcontainer palette persist persistence placeholder pmindicator popup popupboxobject popupopen position predicate preferenceelements preferencepanes preferences priority radiogroup readonly readonly ref reso...
XUL Reference - Archive of obsolete content
button browser checkbox caption clicktoscroll colorpicker column columns commandset command conditions content datepicker deck description dialog dialogheader dropmarker editor grid grippy groupbox hbox iframe image key keyset label listbox listcell listcol listcols listhead listheader listitem member menu menubar menuitem menulist menupopup menuseparator
notification notificationbox observes overlay page panel param popupset preference preferences prefpane prefwindow progressmeter query queryset radio radiogroup resizer richlistbox richlistitem row rows rule scale script scrollbar scrollbox scrollcorner separator spacer spinbuttons splitter stack statusbar statusbarpanel stringbundle stringbundleset tab tabbrowser (firefo...
...abs controls --- text and images label caption image lists --- trees --- layout --- templates --- scripting --- helper elements other xul lists dialog overlay page window wizard wizardpage preference preferences prefpane prefwindow browser tabbrowser editor iframe titlebar resizer statusbar statusbarpanel dialogheader
notification notificationbox menubar menu menuitem menuseparator menupopup panel tooltip popupset toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tabbox tabs tab tabpanels tabpanel groupbox caption separator spacer button checkbox colorpicker datepicker menulist progressmeter radio radiogroup sc...
tabbrowser - Archive of obsolete content
contentwindow, currenturi, docshell, documentcharsetinfo, homepage, markupdocumentviewer, securityui, selectedbrowser, selectedtab, sessionhistory, tabcontainer, tabs, visibletabs, webbrowserfind, webnavigation, webprogress methods addprogresslistener, addtab, addtabsprogresslistener,appendgroup, getbrowseratindex, getbrowserindexfordocument, getbrowserfordocument, getbrowserfortab, geticon, get
notificationbox, gettabforbrowser, gettabmodalpromptbox, goback, gobackgroup, goforward, goforwardgroup, gohome, gotoindex, loadgroup, loadonetab, loadtabs, loaduri, loaduriwithflags, movetabto, pintab, reload, reloadalltabs, reloadtab, reloadwithflags, removealltabsbut, removecurrenttab, removeprogresslistener, removetab, removetabsprogresslistener,replacegroup, selecttabatindex, seticon, showonlythesetabs, ...
... get
notificationbox( browser ) return type:
notificationbox element returns a
notificationbox for the specified browser element.
NPN_GetURLNotify - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary requests creation of a new stream with the contents of the specified url; gets
notification of the result.
...this
notification is the only way the plug-in can tell whether a request with a null target failed, or that a request with a non-null target completed.
NPAPI plugin reference - Archive of obsolete content
npn_geturlnotify requests creation of a new stream with the contents of the specified url; gets
notification of the result.
... npn_posturlnotify posts data to a url, and receives
notification of the result.
Implementation Status - Archive of obsolete content
supported 4.3.7 xforms-focus supported 4.3.8 xforms-help xforms-hint supported 4.3.9 xforms-submit partial see section 11.2 for more details 4.3.10 xforms-submit-serialize supported 4.4
notification events supported 4.4.1 xforms-insert supported 4.4.2 xforms-delete supported 4.4.3 xforms-value-changed supported 4.4.4 xforms-valid supported 4.4.5 xforms-invalid supported...
...getting a few issues with in/out of range
notifications.
Static method - MDN Web Docs Glossary: Definitions of Web-related terms
examples in the
notifications api, the
notification.requestpermission() method is called on the actual
notification constructor itself — it is a static method: let promise =
notification.requestpermission(); the
notification.close() method on the other hand, is an instance method — it is called on an specific
notification object instance to close the system
notification it represents: let my
notification = new notifica...
...tion('this is my
notification'); my
notification.close(); ...
Introduction to web APIs - Learn web development
examples include telling the user that a useful update is available on a web app via system
notifications (see the
notifications api) or vibration hardware (see the vibration api).
...as an example, the
notifications api asks for permission using a pop-up dialogue box: the web audio and htmlmediaelement apis are subject to a security mechanism called autoplay policy — this basically means that you can't automatically play audio when a page loads — you've got to allow your users to initiate audio play through a control like a button.
JavaScript object basics - Learn web development
as an example, the
notifications api — which allows modern browsers to fire system
notifications — requires you to instantiate a new object instance using the constructor for each
notification you want to fire.
... try entering the following into your javascript console: const my
notification = new
notification('hello!'); again, we'll look at constructors in a later article.
Deploying our app - Learn web development
and even better, whenever we make a change and push the change to our remote git repository (on github), this will trigger a
notification to netlify which will then run our specified build task and then deploy the resulting dist directory to our published site.
... could you set up a
notification to let you know when a new deploy succeeded or failed?
Creating a Language Pack
// lots of
notifications about missing entities ...
... // lots of
notifications about missing entities ...
Process scripts
similarly, some observer
notifications must be registered in the content process, but if you do this in a frame script, and the frame script is loaded more than once, then you will get multiple
notifications for that event.
... retrieving the content frame message manager for a content window when an observer
notification in a process script contains a content document or window it can be useful to not use talk through the child/parent process message managers but through the window's content frame message manager, e.g.
Embedding Tips
register your own nsiwebprogresslistener object to listen for progress and state
notifications.
... register your ownnsiwebprogresslistener object to listen for progress and state
notifications.
Getting from Content to Layout
the frame constructor takes these
notifications and does the following: dispatches "restyle events" which trigger the reprocessing of relevant css selectors and any restyling that needs to occur.
... the restyles accumulated in the restyletracker are dispensed with from various method on the presshell that involve reflow and flushing
notifications.
IPDL Tutorial
alternate form of constructor message: supply your own pplugininstanceparent* to bypass allocpplugininstance */ virtual bool callpplugininstanceconstructor(pplugininstanceparent* actor, const nscstring& type, const nstarray<nscstring>& args, int* rv) { /* generated code */ } /* destructor message */ virtual bool call__delete__(pplugininstanceparent* actor) { /* generated code */ } /*
notification that actor deallocation is imminent, ipdl mechanisms are now unusable */ virtual void actordestroy(actordestroyreason why); ...
...*/ virtual bool answer__delete__(pplugininstancechild* actor) = 0; /*
notification that actor deallocation is imminent, ipdl mechanisms are now unusable */ virtual void actordestroy(actordestroyreason why); ...
Implementing Download Resuming
(it is possible to pass an empty string as the id; however, this means that you have no assurance that the file remained unchanged) now, you can open the channel as usual (using nsichannel.asyncopen() in the common case) and write to the file in the ondataavailable
notifications.
... you may want to use nsisimplestreamlistener to simplify this task; to get progress
notifications, you can implement nsiprogresseventsink and set an interface requester as the
notificationcallbacks of the channel that gives out such an event sink (this needs to be done before calling asyncopen).
Introduction to Layout in Mozilla
notifications passes these to the style set object, who in turn passes to the frame constructor frame constructor creates frames constructframeinternal recursively walks content tree, resolves style and creates frames either created by tag (<select>) or by display type (<p>) frame manager maintains mapping from content to frame style resolution compute stylistic infor...
...nager paints views back-to-front, invoking presshell’s paint method presshell::paint walks from the view to the frame; invokes nsiframe::paint for each layer incrementalism single-threaded simple (no locking) can’t leave event queue unattended content construction unwinds “at will” parser and content sink do some buffering content sink has “
notification limits” efficiency vs.
AddonListener
addonlisteners can be registered with addaddonlistener() and will then receive
notification of changes to the add-ons currently installed.
... these
notifications come in the form of calls to methods on the listener object.
Localizing with Mozilla Translator
|-- browser-region | `-- region.properties `-- ab-cd |-- alerts | `--
notificationnames.properties |-- autoconfig | `-- autoconfig.properties |-- cookie | |-- cookieacceptdialog.dtd | `-- cookieacceptdialog.properties |-- global | |-- about.dtd | |-- apppicker.dtd .
... but in the cvs and mozilla-central repositories the locale part looks like this: toolkit |-- locales | |-- en-us | | |-- chrome | | | |-- alerts | | | | `--
notificationnames.properties | | | |-- autoconfig | | | | `-- autoconfig.properties | | | |-- cookie | | | | |-- cookieacceptdialog.dtd | | | | `-- cookieacceptdialog.properties | | | |-- global | | | | |-- about.dtd | | | | |-- apppicker.dtd .
Preference reference
in name including the top level domain is highlighted in the address bar by coloring it black and the other parts grey.browser.urlbar.trimurlsthe preference browser.urlbar.trimurls controls whether the protocol http and the trailing slash behind domain name (if the open page is exactly the domain name) are hidden.dom.event.clipboardevents.enableddom.event.clipboardevents.enabled lets websites get
notifications if the user copies, pastes, or cuts something from a web page, and it lets them know which part of the page had been selected.
...by default, the reader mode in firefox mobile is only enabled if the memory is greater than 384mb.ui.alert
notificationoriginui.alert
notificationorigin controls the position and direction from which popup
notifications invoked by nsialertsservice are sliding in.ui.spellcheckerunderlineui.spellcheckerunderline holds the colour which is used to underline words not recognized by the spellchecker.ui.spellcheckerunderlinestyleui.spellcheckerunderlinestyle holds the style which is used to underline words not recognized ...
About NSPR
this mechanism provides the basic mutual exclusion (mutex) and thread
notification facilities (condition variables) implemented by nspr.
...the java-like facilities include monitor reentrancy, implicit and tightly bound
notification capabilities with the ability to associate the synchronization objects dynamically.
Condition Variables
this chapter describes the api for creating and destroying condition variables, notifying condition variables of changes in monitored data, and making a thread wait on such
notification.
... a call to pr_waitcondvar causes a thread to block until a specified condition variable receives
notification of a change of state in its associated monitored data.
PR_NotifyCondVar
notification of a condition variable signals a change of state in some monitored data.
... when the
notification occurs, the runtime promotes a thread that is waiting on the condition variable to a ready state.
Retrieving part of the bookmarks tree
as long as the container is open, it will listen for
notifications from the bookmarks system to keep itself up-to-date.
...otherwise, it will continue to get observer
notifications and update itself, slowing down the whole browser.
Creating XPCOM components
methods creating an instance of your component weblock1.cpp using xpcom utilities to make things easier xpcom macros generic xpcom module macros common implementation macros declaration macros weblock2.cpp string classes in xpcom using strings nsembedstring and nsembedcstring smart pointers starting weblock getting called at startup registering for
notifications getting access to the category manager providing access to weblock creating the weblock programming interface defining the weblock interface in xpidl the xpidl syntax scriptable interfaces subclassing nsisupports the web locking interface implementing weblock declaration macros representing return values in xpcom xpidl code generation getting the weblock service...
...ile manipulating files with nsifile using nsilocalfile for reading data processing the white list data iweblock method by method lock and unlock addsite removesite setsites getnext getsites hasmoreelements finishing the component using frozen interfaces copying interfaces into your build environment implementing the nsicontentpolicy interface receiving
notifications implementing the nsicontentpolicy uniform resource locators checking the white list creating nsiuri objects building the weblock ui user interface package list client code overview xul the xul document the locking ui site adding ui weblock.xul overlaying new user interface into mozilla weblockoverlay.xul other resources weblock.css image reso...
Components.isSuccessCode
if the task is sufficiently complex that it can fail, the
notification will include a status code indicating the success or failure of the operation (see, for example, nsirequestobserver.onstoprequest()).
... to determine the success or failure of the complex task, you would call components.issuccesscode() upon the status code included in the
notification.
imgIDecoder
this object also implements the imgidecoderobserver interface; you should queryinterface() it to that interface and call its
notification methods while handling the decode operation.
... you should always pass null as the first two parameters of the
notification apis.
imgIRequest
cors_anonymous 2 cors_use_credentials 3 methods cancelandforgetobserver() cancels this request as in nsirequest.cancel(); further, also nulls out decoderobserver so it gets no further
notifications from us.
...aobserver will be notified synchronously (before the clone call returns) with all the
notifications that have already been dispatched for this image load.
mozIAsyncFavicons
this function does not send out
notifications that the data has changed.
...this function does not send out
notifications that the data has changed.
nsIApplicationCacheChannel
d gecko 1.9.1 inherits from: nsiapplicationcachecontainer last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void markofflinecacheentryasforeign(); attributes attribute type description chooseapplicationcache boolean when true, the channel will choose an application cache if one was not explicitly provided and none is available from the
notification callbacks.
... inheritapplicationcache boolean true if the channel will ask its
notification callbacks for an application cache if one is not explicitly provided.
nsIAsyncStreamCopier
void asynccopy( in nsirequestobserver aobserver, in nsisupports aobservercontext ); parameters aobserver receives
notifications.
... aobservercontext the object to receive
notifications with information about the progress of the copy operation.
nsIBrowserHistory
single removals are not subject to individual
notification; instead, nsinavhistoryobserver.onclearhistory() is called on the history observer.
... adobatchnotify obsolete since gecko 9.0 if set to true, the beginupdatebatch and endupdatebatch events are sent; otherwise, no
notification of changes to the history is provided.
nsIContentPrefService
aobserver the name of an object implementing nsicontentprefobserver that will receive
notifications of changes to the preference's value.
... aobserver the name of the observer that will cease receiving
notifications of changes to the preference's value.
nsIDBChangeListener
the nsidbchangelistener interface is used by components wanting to receive
notification when the current database changes somehow.
... onevent() generic
notification for extensibility.
nsIHttpActivityObserver
because a single http transaction may consist of multiple chunks of data transmitted through separate socket writes, each socket activity
notification will only reflect the number of bytes transmitted in that chunk.
... http transaction activity for activity
notifications of type activity_type_http_transaction, there are three activities that include extra data: activity_subtype_request_header aextrastringdata contains the text of the header.
nsIMsgDatabase
addnewhdrtodb will send
notifications to any listeners.
... in nsidbchangelistener instigator); markhdrreplied() void markhdrreplied(in nsimsgdbhdr msghdr, in boolean breplied, in nsidbchangelistener instigator); markhdrmarked() void markhdrmarked(in nsimsgdbhdr msghdr, in boolean mark, in nsidbchangelistener instigator); markmdnneeded() mdn (message disposition
notification) support.
nsIMsgThread
void addchild(in nsimsgdbhdr child, in nsimsgdbhdr inreplyto, in boolean threadinthread, in nsidbchangeannouncer announcer); parameters child the message to add inreplyto the message this should be in reply to threadinthread announcer an nsidbchangeannouncer to receive
notification when the change is made.
... removechildat() void removechildat(in long index); parameters index the index to remove the message from removechildhdr() void removechildhdr(in nsimsgdbhdr child, in nsidbchangeannouncer announcer); parameters child the message to remove announcer an nsidbchangeannouncer to receive
notification when the change is made.
nsIMsgWindow
notificationcallbacks nsiinterfacerequestor these are currently used to set
notification callbacks on protocol channels to handle things like bad cert exceptions.
... void stopurls(); closewindow() when the msg window is being unloaded from the content window, this
notification can be used to force a flush on anything the message window hangs on.
nsINavBookmarksService
note: this is the only method that will send an itemchanged
notification for the property.
... lastmodified will still be updated in any other method that changes an item property, but we will send the corresponding itemchanged
notification instead.
nsIPermissionManager
remarks this service broadcasts the following
notification when the permission list is changed: topic : "perm-changed" (perm_change_
notification) broadcast whenever the permission list changes in some way.
... there are four possible data strings for this
notification; one
notification will be broadcast for each change, and will involve a single permission.
nsIPlacesImportExportService
three nsiobserverservice
notifications are fired as a result of the import.
... three nsiobserverservice
notifications are fired as a result of the import.
nsISocketTransport
completion of the connection setup is indicated by a status_connected_to
notification to the event sink (if set).
... securitycallbacks nsiinterfacerequestor security
notification callbacks passed to the secure socket provider via nsisslsocketcontrol at socket creation time.
nsITransactionManager
methods addlistener() adds a listener to the transaction manager's
notification list.
...removelistener() removes a listener from the transaction manager's
notification list.
nsITransportEventSink
inherits from: nsisupports last changed in gecko 1.7 method overview void ontransportstatus(in nsitransport atransport, in nsresult astatus, in unsigned long long aprogress, in unsigned long long aprogressmax); methods ontransportstatus() transport status
notification.
... void ontransportstatus( in nsitransport atransport, in nsresult astatus, in unsigned long long aprogress, in unsigned long long aprogressmax ); parameters atransport the transport sending this status
notification.
nsIUpdatePrompt
toolkit/mozapps/update/nsiupdateservice.idlscriptable this interface describes an object that can be used to show various update-related
notifications to the user.
...background optional an optional parameter that, if provided and true, presents a less-obtrusive, non-modal
notification alert.
nsIWebBrowser
the chrome may optionally implement nsiinterfacerequestor, nsiwebbrowserchromefocus, nsicontextmenulistener and nsitooltiplistener to receive additional
notifications from the browser object.
...typically this method will be called to register an object to receive nsiwebprogresslistener or nsishistorylistener
notifications in which case the the iid is that of the interface.
nsIWifiMonitor
void startwatching( in nsiwifilistener alistener ); parameters alistener the nsiwifilistener object to receive
notifications when the wifi access point list changes.
...void stopwatching( in nsiwifilistener alistener ); parameters alistener the nsiwifilistener object to stop receiving
notifications on.
Index
the activity manager works in conjunction with the interactive status bar to give the user
notifications concerning what thunderbird is doing and how thunderbird has handled user requests.
...this may seem like a lot of infrastructure just to read messages from a flat file, but it allows us to do it asynchronously, and to have reading local messages fit into the same kind of mechanisms that reading nntp and imap messages do - running urls, getting onstart/stoprunningurl
notifications when the url starts/stops, etc.
Main Windows
the rest is loaded from overlays: mailwindowoverlay.xul this is the red sections shown in the interface above (where?), including the toolbars,
notification bars, and the status bar, but also includes most of the commands, keysets, and context menus of thunderbird, along with a whole lot of javascript.
... mailwindowoverlay.xul this is the red sections shown in the interface above, including the toolbars,
notification bars and the status bar.it also includes most of the commands, keysets, and context menus of thunderbird, along with a whole lot of javascript.
Browser Side Plug-in API - Plugins
npn_geturlnotify requests creation of a new stream with the contents of the specified url; gets
notification of the result.
... npn_posturlnotify posts data to a url, and receives
notification of the result.
Gecko Plugin API Reference - Plugins
npn_geturlnotify requests creation of a new stream with the contents of the specified url; gets
notification of the result.
... npn_posturlnotify posts data to a url, and receives
notification of the result.
BroadcastChannel() - Web APIs
example // create a new channel listening to the "internal_
notification" channel.
... var bc = new broadcastchannel('internal_
notification'); bc.postmessage('new listening connected!'); specifications specification status comment html living standardthe definition of 'broadcastchannel()' in that specification.
Clients - Web APIs
examples the following example shows an existing chat window or creates a new one when the user clicks a
notification.
... addeventlistener('
notificationclick', event => { event.waituntil(async function() { const allclients = await clients.matchall({ includeuncontrolled: true }); let chatclient; // let's see if we already have a chat window open: for (const client of allclients) { const url = new url(client.url); if (url.pathname == '/chat/') { // excellent, let's use it!
Using the Frame Timing API - Web APIs
registering for
notifications after an observer is created, the next step is to use the performanceobserver.observe() method to specify the set of performance events to observe.
... in the following example, the observer only registers for "frame" performance entry
notifications.
Using IndexedDB - Web APIs
as a workaround for this normal shutdown
notification, you might track your transactions and add a beforeunload event to warn the user if any transactions have not yet completed at the time of unloading.
... at least with the addition of the abort
notifications and idbdatabase.onclose, you can know when this has happened.
Key Values - Web APIs
qt::key_lastnumberredial (0x01100009) "
notification" the
notification key.
... keycode_
notification (83) "mannermode" a button which cycles among the
notification modes: silent, vibrate, ring, and so forth.
Long Tasks API - Web APIs
usage var observer = new performanceobserver(function(list) { var perfentries = list.getentries(); for (var i = 0; i < perfentries.length; i++) { // process long task
notifications: // report back for analytics and monitoring // ...
... } }); // register observer for long task
notifications observer.observe({entrytypes: ["longtask"]}); // long script execution after this will result in queueing // and receiving "longtask" entries in the observer.
MediaDevices.getUserMedia() - Web APIs
user privacy as an api that may involve significant privacy concerns, getusermedia() is held by the specification to very specific requirements for user
notification and permission management.
... of equal importance are the rules around
notification.
MediaQueryList - Web APIs
the resulting object handles sending
notifications to listeners when the media query state changes (i.e.
...this method has been kept for backward compatibility; if possible, you should generally use removeeventlistener() to remove change
notification callbacks (which should have previously been added using addeventlistener()).
MediaRecorder.onerror - Web APIs
am) { let recorder = null; let bufferlist = []; try { recorder = new mediarecorder(stream); } catch(err) { return err.name; /* return the error name */ } recorder.ondataavailable = function(event) { bufferlist.push(event.data); }; recorder.onerror = function(event) { let error = event.error; switch(error.name) { case invalidstateerror: show
notification("you can't record the video right " + "now.
... try again later."); break; case securityerror: show
notification("recording the specified source " + "is not allowed due to security " + "restrictions."); break; default: show
notification("a problem occurred while trying " + "to record the video."); break; } }; /* this would be a good place to create a worker to handle writing the buffers to disk periodically */ recorder.start(100); /* 100ms time slices per buffer */ return recorder; } specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onerror' in that specification.
Media Session action types - Web APIs
let skiptime = 10; // time to skip in seconds navigator.mediasession.setactionhandler('seekforward', evt => { // user clicked "seek forward" media
notification icon.
... audio.currenttime = math.min(audio.currenttime + skiptime, audio.duration); }); navigator.mediasession.setactionhandler('seekbackward', evt => { // user clicked "seek backward" media
notification icon.
MediaSessionActionDetails - Web APIs
let skiptime = 10; // time to skip in seconds navigator.mediasession.setactionhandler('seekforward', evt => { // user clicked "seek forward" media
notification icon.
... audio.currenttime = math.min(audio.currenttime + skiptime, audio.duration); }); navigator.mediasession.setactionhandler('seekbackward', evt => { // user clicked "seek backward" media
notification icon.
Media Session API - Web APIs
the media session api provides a way to customize media
notifications.
...the platform can show this metadata in media centers,
notifications, device lockscreens, etc.
MutationObserver.observe() - Web APIs
the mutationobserver method observe() configures the mutationobserver callback to begin receiving
notifications of changes to the dom that match the given options.
... in other words, until you've been notified that nodes are being split off from your monitored subtree, you'll get
notifications of changes to that split-off subtree and its nodes.
Web-based protocol handlers - Web APIs
firefox displays a prompt in the
notification bar area: note:the url template supplied when registering must be of the same domain as the webpage attempting to perform the registration or the registration will fail.
... registering the same protocol handler more than once will pop up a different
notification, indicating that the protocol handler is already registered.
Navigator - Web APIs
navigator.moz
notification deprecated since gecko 22 ...
... navigator.webkit
notification returns a
notification object you can use to deliver
notifications to the user from your web application.
Using the Permissions API - Web APIs
historically, different apis handle their own permissions inconsistently — for example the
notifications api allows for explicit checking of permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request, as we'll see below).
... the only two apis currently recognized by the permissions api in chrome are geolocation and
notification, with firefox also recognizing push and webmidi.
Permissions API - Web APIs
concepts and usage historically different apis handle their own permissions inconsistently — for example the
notifications api allows for explicit checking of permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request).
...notable apis that are permissions-aware include: clipboard api
notifications api push api web midi api more apis will gain permissions api support over time.
PushEvent.data - Web APIs
self.addeventlistener('push', function(event) { if (!(self.
notification && self.
notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; var message = data.message || "here's something you might want to check out."; var icon = "images/new-
notification.png"; var
notification = new
notification(title, { body: message, tag: 'simpl...
...e-push-demo-
notification', icon: icon });
notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definition of 'data' in that specification.
PushEvent - Web APIs
self.addeventlistener('push', function(event) { if (!(self.
notification && self.
notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; var message = data.message || "here's something you might want to check out."; var icon = "images/new-
notification.png"; var
notification = new self.
notification(title, { body: message, tag: '...
...simple-push-demo-
notification', icon: icon });
notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definition of 'pushevent' in that specification.
PushManager.permissionState() - Web APIs
note: as of firefox 44, the permissions for
notifications and push have been merged.
... if permission is granted for
notifications, push will also be enabled.
PushManager.subscribe() - Web APIs
example this.onpush = function(event) { console.log(event.data); // from here we can write the data to indexeddb, send it to any open // windows, display a
notification, etc.
... } ); }); responding to user gestures subscribe() calls should be done in response to a user gesture, such as clicking a button, for example: btn.addeventlistener('click', function() { serviceworkerregistration.pushmanager.subscribe(options) .then(function(pushsubscription) { // handle subscription }); }) this is not only best practice — you should not be spamming users with
notifications they didn't agree to — but going forward browsers will explicitly disallow
notifications not triggered in response to a user gesture.
PushManager - Web APIs
the pushmanager interface of the push api provides a way to receive
notifications from third-party servers as well as request urls for push
notifications.
... example this.onpush = function(event) { console.log(event.data); // from here we can write the data to indexeddb, send it to any open // windows, display a
notification, etc.
RTCIceTransport.state - Web APIs
"completed" the transport has finished gathering local candidates and has received a
notification from the remote peer that no more candidates will be sent.
... "failed" the rtcicetransport has finished the gathering process, has received the "no more candidates"
notification from the remote peer, and has finished checking pairs of candidates, without successfully finding a pair that is both valid and for which consent can be obtained.
RTCIceTransportState - Web APIs
"completed" the transport has finished gathering local candidates and has received a
notification from the remote peer that no more candidates will be sent.
... "failed" the rtcicetransport has finished the gathering process, has received the "no more candidates"
notification from the remote peer, and has finished checking pairs of candidates, without successfully finding a pair that is both valid and for which consent can be obtained.
ServiceWorkerGlobalScope.onpush - Web APIs
the data payload of the push message is available in the event object's data property (pushevent.data, which contains a pushmessagedata object.) self.addeventlistener('push', function(event) { if (!(self.
notification && self.
notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; var message = data.message || "here's something you might want to check out."; var icon = "images/new-
notification.png"; var
notification = new
notification(title, { body: message, tag: 'simpl...
...e-push-demo-
notification', icon: icon });
notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definition of 'onpush' in that specification.
Service Worker API - Web APIs
they will also allow access to push
notifications and background sync apis.
...
notificationevent the parameter passed into the on
notificationclick handler, the
notificationevent interface represents a
notification click event that is dispatched on the serviceworkerglobalscope of a serviceworker.
Web APIs
information api ppage visibility apipayment request apiperformance apiperformance timeline apipermissions apipointer eventspointer lock apiproximity events push api rresize observer apiresource timing apisserver sent eventsservice workers apistoragestorage access apistreams ttouch eventsuurl apivvibration apivisual viewport wweb animationsweb audio apiweb authentication apiweb crypto apiweb
notificationsweb storage apiweb workers apiwebglwebrtcwebvttwebxr device apiwebsockets api interfaces this is a list of all the interfaces (that is, types of objects) that are available.
... mutationevent mutationobserver mutationobserverinit mutationrecord n ndefmessage ndefreader ndefreadingevent ndefrecord ndefwriter namelist namednodemap navigationpreloadmanager navigator navigatorconcurrenthardware navigatorid navigatorlanguage navigatoronline navigatorplugins navigatorstorage networkinformation node nodefilter nodeiterator nodelist nondocumenttypechildnode notation
notification notificationaction
notificationevent notifyaudioavailableevent o oes_element_index_uint oes_fbo_render_mipmap oes_standard_derivatives oes_texture_float oes_texture_float_linear oes_texture_half_float oes_texture_half_float_linear oes_vertex_array_object ovr_multiview2 offlineaudiocompletionevent offlineaudiocontext offscreencanvas orientationsensor oscillatornode overconstrainederror p...
Alerts - Accessibility
instead of using the javascript ‘alert’ function, we’ll use a simple wai-aria widget for
notification.
...this is similar to the
notification bar in firefox that prompts you whether you want to save a password.
Using the application cache - HTML: Hypertext Markup Language
some browsers (e.g., firefox) display a
notification bar the first time a user loads an application that uses the application cache.
... the
notification bar displays a message such as: this website (example.com) is asking to store data on your computer for offline use.
Link prefetching FAQ - HTTP
from this, we receive document start & stop
notifications, and we approximate idle time as the period between the last document stop and the next document start.
... the last document stop
notification occurs roughly when the onload handler would fire for the toplevel document.
A typical HTTP session - HTTP
0b53a2996dfd4653c1c3" server: meinheld/0.6.1 strict-transport-security: max-age=63072000 x-content-type-options: nosniff x-frame-options: deny x-xss-protection: 1; mode=block vary: accept-encoding,cookie age: 7 <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>a simple webpage</title> </head> <body> <h1>simple html5 webpage</h1> <p>hello, world!</p> </body> </html>
notification that the requested resource has permanently moved: http/1.1 301 moved permanently server: apache/2.4.37 (red hat) content-type: text/html; charset=utf-8 date: thu, 06 dec 2018 17:33:08 gmt location: https://developer.mozilla.org/ (this is the new link to the resource; it is expected that the user-agent will fetch it) keep-alive: timeout=15, max=98 accept-ranges: bytes via: moz-cache-zlb05 connec...
...(contains a site-customized page helping the user to find the missing resource)
notification that the requested resource doesn't exist: http/1.1 404 not found content-type: text/html; charset=utf-8 content-length: 38217 connection: keep-alive cache-control: no-cache, no-store, must-revalidate, max-age=0 content-language: en-us date: thu, 06 dec 2018 17:35:13 gmt expires: thu, 06 dec 2018 17:35:13 gmt server: meinheld/0.6.1 strict-transport-security: max-age=63072000 x-content-type-options: nosniff x-frame-options: deny x-xss-protection: 1; mode=block vary: accept-encoding,cookie x-cache: error from cloudfront <!doctype html...
How to make PWAs installable - Progressive web apps (PWAs)
when the user visits the pwa with a supporting mobile browser, it should display a
notification (such as a banner or dialog box) indicating that it's possible to install the app as a pwa.
... now let's move to the last piece of the pwa puzzle: using push
notifications to share announcements with the user, and to help the user re-engage with your app.
Progressive loading - Progressive web apps (PWAs)
previous overview: progressive web apps in previous articles we covered apis that help us make our js13kpwa example a progressive web app: service workers, web manifests,
notifications and push.
... final thoughts that's all for this tutorial series — we went through the source code of the js13kpwa example app and learned about the use of progressive web apps features including an introduction, pwa structure, offline availability with service workers, installable pwas, and finally
notifications.
XUL Migration Guide - Archive of obsolete content
for example, if you have only imported the
notifications module, then even if a malicious web page manages to inject code into your add-on, it can't use the sdk's file module to access the user's data.
Storing annotations - Archive of obsolete content
add the following to your add-on's main function: simplestorage.on("overquota", function () {
notifications.notify({ title: 'storage space exceeded', text: 'removing recent annotations'}); while (simplestorage.quotausage > 1) simplestorage.storage.annotations.pop(); }); because we use a
notification to alert the user, we need to import the
notifications module: var
notifications = require("sdk/
notifications"); (it should be obvious that this is an incredibly unhelpful way to deal with...
Developing for Firefox Mobile - Archive of obsolete content
high-level apis addon-page not supported base64 supported clipboard not supported context-menu not supported hotkeys supported indexed-db supported l10n supported
notifications supported page-mod supported page-worker supported panel not supported passwords supported private-browsing not supported querystring supported request supported selection not supported self supported simple-prefs supported simple-storage supported syste...
Preferences - Archive of obsolete content
after it's garbage collected, you won't receive
notifications anymore, so use the provided examples above, and don't write something like the following code: // don't do this components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefservice) .getbranch("myextension.prefs.") .queryinterface(components.interfaces.nsiprefbranch2) .addobserver("", this, false); using prefhasuservalue() nsiprefbranch.p...
Sidebar - Archive of obsolete content
for example the code below calls a function defined in the sidebar's context: var sidebarwindow = document.getelementbyid("sidebar").contentwindow; // verify that our sidebar is open at this moment: if (sidebarwindow.location.href == "chrome://yourextension/content/whatever.xul") { // call "your
notificationfunction" in the sidebar's context: sidebarwindow.your
notificationfunction(anyarguments); } testing which sidebar is open the sidebar content may contain different panels (bookmarks, history, webpanel, etc.) and sometimes one wants to only act on the sidebar when it contains a specific panel.
Code snippets - Archive of obsolete content
xml file i/o code used to read, write and process files drag & drop code used to setup and handle drag and drop events dialogs code used to display and process dialog boxes alerts and
notifications modal and non-modal ways to notify users preferences code used to read, write, and modify preferences js xpcom code used to define and call xpcom components in javascript running applications code used to run other applications <canvas> related what wg canvas-related code signing a xpi how to sign an xpi with pki delayed execution performing background operations.
XUL School Tutorial - Archive of obsolete content
introduction introduction getting started with firefox extensions the essentials of an extension setting up a development environment javascript object management basic functionality adding menus and submenus adding toolbars and toolbar buttons adding events and commands adding windows and dialogs adding sidebars user
notifications and alerts intermediate functionality intercepting page loads connecting to remote content handling preferences local storage advanced topics the box model xpcom objects observer
notifications custom xul elements with xbl mozilla documentation roadmap useful mozilla community sites appendices appendix a: add-on performance appendix b: install an...
Monitoring WiFi access points - Archive of obsolete content
tener = new test(); var wifi_service = components.classes["@mozilla.org/wifi/monitor;1"].getservice(components.interfaces.nsiwifimonitor); wifi_service.startwatching(listener); </script> </head> <body> <div id="d"><p></p></div> <div id="c"><p></p></div> </body> </html> the nsiwifilistener object the first thing the code above does is to prototype the listener object that will be receiving
notifications of changes to the access point list.
Working with BFCache - Archive of obsolete content
q: hmm, so what event tells me “you'll never get a pageshow so you can drop the megabytes of info you've saved in firebug side table for that page?” a: an observer
notification with the topic "inner-window-destroyed" whose subject is an nsisupportspruint64 containing the window id of the inner window being destroyed.
HTTP Class Overview - Archive of obsolete content
nshttphandler implements nsiprotocolhandler manages preferences owns the authentication cache holds references to frequently used services nshttpchannel implements nsihttpchannel talks to the cache initiates http transactions processes http response codes intercepts progress
notifications nshttpconnection implements nsistreamlistener & nsistreamprovider talks to the socket transport service feeds data to its transaction object routes progress
notifications nshttpconnectioninfo identifies a connection nshttptransaction implements nsirequest encapsulates a http request and response parses incoming data nshttpchunkeddecoder owned by a transaction strips chu...
Me - Archive of obsolete content
inside the function, this is the jetpack's content.function example jetpack.me.onfirstrun(function(){ jetpack.
notifications.show("oh boy, i'm installed!");}); ...
Simple Storage - Archive of obsolete content
this code persistently stores some data: jetpack.future.import("storage.simple");var mystorage = jetpack.storage.simple;mystorage.fribblefrops = [1, 3, 3, 7];mystorage.heimelfarbs = { bar: "baz" }; and this code -- pretend it's in the same jetpack as the code above -- simply uses that data: mystorage.fribblefrops.foreach(function (elt) console.log(elt));var bar = mystorage.heimelfarbs.bar;jetpack.
notifications.show(bar.baz); that's all there is to it!
UI - Archive of obsolete content
etpack content in a slide-out animated vertical column toolbar including entries and access elements into the toolbar panel a movable, expandable, and custom styled content element to display jetpack content tabs adding events and interacting with browser tabs and their contained documents statusbar low-level functions and basic calls
notifications a system for alerting users via provided ui mechanisms selection interacting with user-selected content window mitigates and eases interactions between different browser windows ...
Simple Storage - Archive of obsolete content
ode persistently stores some data: jetpack.future.import("storage.simple"); var mystorage = jetpack.storage.simple; mystorage.fribblefrops = [1, 3, 3, 7]; mystorage.heimelfarbs = { bar: "baz" }; and this code -- pretend it's in the same jetpack as the code above -- simply uses that data: mystorage.fribblefrops.foreach(function (elt) console.log(elt)); var bar = mystorage.heimelfarbs.bar; jetpack.
notifications.show(bar.baz); that's all there is to it!
Prism - Archive of obsolete content
this includes the ability to create desktop shortcuts, to place the application icon in the tray or dock and to display pop-up
notifications.
type - Archive of obsolete content
see button.type browser.type colorpicker.type datepicker.type editor.type listcell.type listitem.type menuitem.type
notification.type prefwindow.type query.type script.type textbox.type toolbarbutton.type treecol.type ...
findbar - Archive of obsolete content
ltnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata close() return type: no return value closes the
notification or findbar and removes it from its enclosing
notificationbox or findbar.
close - Archive of obsolete content
« xul reference home close() return type: no return value closes the
notification or findbar and removes it from its enclosing
notificationbox or findbar.
CommandLine - Archive of obsolete content
ervice = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); observerservice.removeobserver(this, "commandline-args-changed"); } } var observer = new commandlineobserver(); // because we haven't yet registered a commandlineobserver when the application is // launched the first time, we simulate a
notification here.
nsIContentPolicy - Archive of obsolete content
} // and this into your implementation file ns_impl_isupportsn(myclass, nsisupports, nsicontentpolicy, ...) note: before you can recieve
notifications, you must register your plugin with nsicategorymanager.
2006-11-10 - Archive of obsolete content
important dates: technical submissions: monday 19th feb 2007 technical paper
notification: friday 16th march 2007 communication submissions: monday 26th march 2007 communication paper
notification: friday 06th april 2007 all camera ready due: monday 16th april 2007 conference dates: monday 07th and tuesday 08th may 2007 notable keynotes representatives from w3c, ibm, university of manchester, uk and oxford brookes university, uk.
Using workers in extensions - Archive of obsolete content
let's take a look: startup: function() { // register to receive
notifications of preference changes this.prefs = components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefservice) .getbranch("stockwatcher2."); this.prefs.queryinterface(components.interfaces.nsiprefbranch2); this.prefs.addobserver("", this, false); this.tickersymbol = this.prefs.getcharpref("symbol").touppercase(); this.worker =...
Reference - Archive of obsolete content
thanks for your thoughts --callek 15:05, 13 january 2006 (pst)
notification when reorganization is finished leandro (localiser for the portuguese wiki) would like to be emailed when the js reference reorganization has been finished.
Archived open Web documentation - Archive of obsolete content
browser feature detection an experimental approach to discovering degree of support for standards css obsolete css features displaying
notifications (deprecated) firefox offers support for "desktop
notifications"; these are
notifications that are displayed to the user outside the context of the web content, using the standard
notification system provided by the operating system.
Common causes of memory leaks in extensions - Extensions
services.obs.removeobserver(myobserver, "private-browsing"); } in javascript code modules it recommended to also observe the xpcom-shutdown or quit-application
notifications and unregister your observers from that topic: var myobserver = { observe: function(subject, topic, data) { if (topic == "xpcom-shutdown") { services.obs.removeobserver(myobserver, "private-browsing"); services.obs.removeobserver(myobserver, "xpcom-shutdown"); } else { // do something with "private-browsing" } } }; services.obs.addobserver(myobserver, "priv...
Accessibility API cross-reference
for receiving text input, see focused n/a armed armed available to javascript as document.activeelement indicates whether assistive technologies will present all, or only parts of, the changed region based on the change
notifications defined by the aria-relevant attribute.
Embedding API for Accessibility
l of the current keyboard focus frame */ no browse with caret setboolpref("accessibility.browsewithcaret", usecaret); /* if this pref is set, the caret will be visible in the text of the browser, allowing the user to cursor around the html content as if in a read-only editor */ moz 0.9 special content
notifications the w3c uaag specifies types of content that must be optional.
Application cache implementation overview
finished state is set when updated is 'finished' and is the last state the update transits to after invoking one of the final dom
notifications (onnoupdate, onupdaterady or onerror.) ...
Testopia
bugzilla 4.x mysql 5.0 or postgresql 8.3 mozilla compatible browser ;-) additional perl modules: text::csv xml::schema validator xml::schema::parser (for importer) and json 2.10 todo user preferences
notification emails more reports see the roadmap and bug list for more details.
Experimental features in Firefox
this api is used to customize the handling of media-related
notifications, to manage events and data useful for presenting a user interface for managing media playback, and to obtain media file metadata.
Communicating with frame scripts
script function handlemessagefromchrome(message) { var payload = message.data.details; // "some more details" } addmessagelistener("my-addon@me.org:message-from-chrome", handlemessagefromchrome); message-manager-disconnect if you're using a message manager to communicate with a script that may be running in a different process, you can listen for the message-manager-disconnect observer
notification to know when the message manager has disconnected from the other end of the conversation, so you can stop sending it messages or expecting to receive messages.
Message manager overview
this is the recommended way to load a script that executes just once per child process, which is something you might want to do if you are interacting with some global service (for example, adding listeners to observer
notifications or registering a content policy).
Message manager overview
this is the recommended way to load a script that executes just once per child process, which is something you might want to do if you are interacting with some global service (for example, adding listeners to observer
notifications or registering components).
HTTP Cache
rence -- cacheentry::asyncopen (entry atomic): the opener is added to fifo, consumer reference ++ (dropped back after an opener is removed from the fifo) state == notloaded: state = loading when open_truncate flag was used: cachefile is created as 'new', state = empty otherwise: cachefile is created and load on it started cacheentry::onfileready
notification is now expected state == loading: just do nothing and exit call to cacheentry::invokecallbacks cacheentry::invokecallbacks (entry atomic): called on: a new opener has been added to the fifo via an asyncopen call asynchronous result of cachefile open the writer throws the entry away the output stream of the entry has been opened or closed metadataready or set...
TypeListener
typelisteners can be registered with addtypelistener() and will then receive
notification as addontype are registered and unregistered.
Add-on Manager
for example: components.utils.import("resource://gre/modules/addonmanager.jsm"); addonmanager.getalladdons(function(aaddons) { // here aaddons is an array of addon objects }); // this code will execute before the code inside the callback
notifications about changes to installed add-ons are dispatched to any registered addonlisteners.
Downloads.jsm
observer
notifications (for example, "dl-done") and download listeners are replaced by views on the downloadlist object returned by the getlist() method.
JNI.jsm
we can use dot
notification here for the parent class.
NetUtil.jsm
}); remarks note: if you specify an nsichannel as the input source, and its
notification callbacks have already been set, callers are responsible for implementing nsibadcertlistener and nsisslerrorlistener.
XPCOMUtils.jsm
examples definelazygetter var myservices = {}; cu.import('resource://gre/modules/xpcomutils.jsm'); //set it up xpcomutils.definelazygetter(myservices, 'as', function () { return cc['@mozilla.org/alerts-service;1'].getservice(ci.nsialertsservice) }); //when you need to use it myservices.as.showalert
notification('chrome://branding/content/icon64.png', 'this was lazyloaded', 'this is a
notification from myservices.as', null, null); ...
Profiling with the Firefox Profiler
here, i'm hovering over the last layer in the layer tree (a paintedlayercomposite), and a strip at the top of the right panel is highlighted, telling me that this layer is for the system
notification bar in b2g.
dom.event.clipboardevents.enabled
dom.event.clipboardevents.enabled lets websites get
notifications if the user copies, pastes, or cuts something from a web page, and it lets them know which part of the page had been selected.
L20n HTML Bindings
<script type="application/l10n-data+json"> { "new
notifications": 3, "user": { "name": "jane", "gender": "feminine" } } </script> this data will be available context-wide to all localized strings.
Cached Monitors
pr_cwait waits for a
notification that a monitor's state has changed.
PR_Wait
ticks the amount of time (in printervaltime units) that the thread is willing to wait for an explicit
notification before being rescheduled.
PR_WaitCondVar
any value other than pr_interval_no_timeout or pr_interval_no_wait for the timeout parameter will cause the thread to be rescheduled due to either explicit
notification or the expiration of the specified interval.
Threads
once the target thread has been notified of the request, the request stays with the thread until the
notification either has been delivered exactly once or is cleared.
FC_OpenSession
flags [in] papplication notify [in] pointer to a
notification callback function.
JS_NewGlobalObject
debugger api hook during global creation, we fire
notifications to callbacks registered via the debugger api.
Shell global objects
in gecko, this sends a memory pressure
notification, which can free up some memory.
ROLE_ALERT
used by aria: alert, alertdialog xul: <
notification/>, <panel noautofocus = "true"/> ...
XUL Accessibility
role="grouping" id="control" /> get tooltiptext attribute value if the aria role is used and it allows to have accessible value then aria-valuetext or aria-valuenow are used if the element is xlink then value is generated from link location actions if the element is xlink then jump action is exposed if the element has registered click event handler then click action is exposed xul elements
notification used to display an informative message.
Feed content access API
nsifeedresultlistener implemented by the program that wants to parse an rss or atom feed to receive
notification when parsing is complete.
Using the Places history service
break; } in case the database is locked by a third party process and cannot be opened, a "places-database-locked"
notification is fired, in such a case the service won't be able to initialize.
Accessing the Windows Registry Using XPCOM
you can read the interface documentation for a full explanation, but we will show only the three most commonly used modes here: access_read — for reading values, enumerating keys, and receiving
notifications access_write — for setting values and creating sub keys access_all — access for all operations in addition to open() and create(), there are the openchild() and createchild() methods.
An Overview of XPCOM
these services include a cross platform file abstraction which provides uniform and powerful access to files, directory services which maintain the location of application- and system-specific locations, memory management to ensure everyone uses the same memory allocator, and an event
notification system that allows passing of simple messages.
XPCOM guide
mozilla::services namespacethe services c++ namespace offers an easy and efficient alternative for obtaining a service as compared to the indirect xpcom approach: getservice(), callgetservice(), etc methods are expensive and should be avoided when possible.receiving startup
notificationssometimes it's necessary for xpcom components to receive
notifications as to the progress of the application's startup process, so they can start new services at appropriate times, for example.xpcom array guidemozilla has many array classes because each array is optimized for a particular usage pattern.
Components object
utils.scheduleprecisegc requests that garbage collection occur sometime in the future when no javascript code is running; accepts a callback function to receive
notification once collection is complete.
NS_ShutdownXPCOM
calling this method triggers the "xpcom-shutdown"
notification to be dispatched to observers.
imgIContainer
aobserver observer to send animation
notifications to.
imgILoader
alistener a listener that you must send the channel's
notifications and data to.
mozIStorageConnection
acallback optional a mozistoragestatementcallback object to receive progress, error, and completion
notifications.
mozIStoragePendingStatement
note: for read statements, such as select, once you cancel the statement, you will receive no further
notifications about results.
mozIStorageStatement
the optional callback routine receives
notifications about the progress of the query.
mozIStorageStatementCallback
the mozistoragestatementcallback interface represents a callback handler that the storage api calls with result, error, and completion
notifications while handling asynchronous database queries.
mozIThirdPartyUtil
obtain the bottommost nsidomwindow, and its same-type parent if it exists, from the channel's
notification callbacks.
nsIAppShell
favorperformancehint() give hint to native event queue
notification mechanism.
nsIAppShellService
note: when this method is successful, it fires the global
notification "xul-window-registered" void registertoplevelwindow( in nsixulwindow awindow ); parameters awindow the window to register.
nsIAuthPrompt2
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) this interface is usually acquired using getinterface on
notification callbacks or similar.
nsICacheService
); obsolete since gecko 1.9.2 void evictentries(in nscachestoragepolicy storagepolicy); void init(); obsolete since gecko 1.8 void shutdown(); obsolete since gecko 1.8 void visitentries(in nsicachevisitor visitor); attributes attribute type description cacheiotarget nsieventtarget the event target for cache i/o operation
notifications.
nsICachingChannel
this value is undefined before the channel fires its onstartrequest
notification and after the channel fires its onstoprequest
notification.
nsIChannelEventSink
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) channels will try to get this interface from a channel's
notificationcallbacks or, if not available there, from the loadgroup's
notificationcallbacks.
nsIClipboard
forcedatatoclipboard() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) some platforms support deferred
notification for putting data on the clipboard this method forces the data onto the clipboard in its various formats this may be used if the application going away.
nsIDOMGeoGeolocation
you can request a single
notification of the user's current position, or you can monitor the position over time.
nsIDOMGeoPositionErrorCallback
the nsidomgeopositionerrorcallback interface is used to represent an object that receives callback
notifications when geolocation errors occur.
nsIDOMGlobalPropertyInitializer
an alternative way to expose an object to the web content is to add the property in response to the content-document-global-created
notification.
nsIDocumentLoader
it is also responsible for sending nsiwebprogresslistener
notifications.
nsIFTPEventSink
it can be used as a
notification callback on an ftp channel.
nsIFeed
1.0 66 introduced gecko 1.8 inherits from: nsifeedcontainer last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) attributes attribute type description cloud nsiwritablepropertybag2 the cloud element on a feed is used to identify the api endpoint of an rsscloud ping server, which distributes
notifications of changes to this feed.
nsIFrameMessageManager
an alternative method to listen for death of frame script is to use message-manager-disconnect observer: observer
notifications :: message manager.
nsIFrameScriptLoader
if you want a frame script to do something whenever a new document is loaded, you can listen for the document-element-inserted
notification.
nsIGlobalHistory3
this
notification must be sent for history consumers for all non-redirect pages.
nsILoginManagerPrompter
the prompt will be associated with this window (or, if a
notification bar is being used, topmost opener in some cases).
nsIMessageListenerManager
an alternative method to listen for death of frame script is to use a message-manager-disconnect observer; see observer
notifications :: message manager.
nsIMsgFilterCustomAction
otherwise, be careful * that the action does correct
notifications to maintain counts, and correct * manipulations of both imap and local non-database storage of message * metadata.
nsIMsgSearchNotify
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchnotify.idl [scriptable, uuid(ca37784d-352b-4c39-8ccb-0abc1a93f681)] interface nsimsgsearchnotify : nsisupports { void onsearchhit(in nsimsgdbhdr header, in nsimsgfolder folder); //
notification that a search has finished.
nsIPrintingPrompt
webprogresslistener additional listener can be registered for progress
notifications.
nsIPrivateBrowsingService
changing this value while handling one of the
notifications generated by the private browsing service throws an ns_error_failure exception.
nsIPushMessage
inherits from: nsisupports last changed in gecko 46.0 (firefox 46.0 / thunderbird 46.0 / seamonkey 2.43) nsipushmessage is the subject of a push-message observer
notification.
nsIPushSubscription
a subscription expires if its service worker exceeds the quota, or if the desktop-
notification permission for its origin is revoked.
nsISHistoryListener
docshell/shistory/public/nsishistorylistener.idlscriptable an interface you can implement to receive
notifications about activities that occur in session history, and optionally cancel them.
nsISSLErrorListener
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) note: the recipient of this ssl status
notification should not block.
nsISSLSocketControl
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void proxystartssl(); void starttls(); attributes attribute type description forcehandshake boolean obsolete since gecko 1.9
notificationcallbacks nsiinterfacerequestor methods proxystartssl() starts an ssl proxy connection.
nsISmsRequestManager
nsismsrequestmanager dom/sms/interfaces/nsismsrequestmanager.idlscriptable used to manage sms related requests and
notifications for the websms api 1.0 66 introduced gecko 13.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsrequestmanager;1.
nsITaskbarProgress
widget/public/nsitaskbarprogress.idlscriptable starting in windows 7, applications can display a progress
notification in the taskbar.
nsITraceableChannel
1.0 66 introduced gecko 1.9.0.4 inherits from: nsisupports last changed in gecko 1.9.0.4 the typical way to use this interface is as follows: register for the "http-on-examine-response"
notification to track all http responses; skip redirects (responsestatus = 3xx on nsihttpchannel), since otherwise you may end up with two listeners registered for a channel; qi the channel passed as the "subject" to your observer to nsitraceablechannel, and replace the default nsistreamlistener (that passes the data to the original requester - e.g.
nsITreeBoxObject
the view is responsible for calling this
notification method when rows are added or removed.
nsIUpdate
this allows the user to never receive a
notification for that specific update version again.
nsIUpdateCheckListener
onprogress() called every time there is a progress
notification loading the update service file.
nsIWebBrowserPersist
progresslistener nsiwebprogresslistener callback listener for progress
notifications.
nsIWebSocketChannel
notificationcallbacks nsiinterfacerequestor the
notification callbacks for authorization and so forth.
nsIWebSocketListener
this is the final
notification the listener will receive; once it's been received, the websocket connection is complete.
nsIWifiListener
netwerk/wifi/nsiwifilistener.idlscriptable this interface is implemented by clients interested in receiving
notifications when the list of available wifi access points changes.
nsIWorker
method overview void postmessage(in domstring amessage, [optional] in nsiworkermessageport amessageport); attributes attribute type description onmessage nsidomeventlistener an object to receive
notifications when messages are received on the worker's message port.
nsIXULWindow
when the window is destroyed, it will fire a "xul-window-destroyed"
notification through the global observer service.
nsIZipWriter
void processqueue( in nsirequestobserver aobserver, in nsisupports acontext ); parameters aobserver the observer to receive
notifications from the queue.
Storage
both of these methods have similar signatures that accept an object as input that receives
notifications the execution of the statement(s).
The Thread Manager
nsithreadobserver provides the ability to monitor a thread, to receive
notifications when events are dispatched to it and when they're finished being processed.
XPCOM
this guide provides some explanation and advice on how to choose between them.observer
notificationsthe following are topics that you can observe during the course of an application.
Mailbox
this may seem like a lot of infrastructure just to read messages from a flat file, but it allows us to do it asynchronously, and to have reading local messages fit into the same kind of mechanisms that reading nntp and imap messages do - running urls, getting onstart/stoprunningurl
notifications when the url starts/stops, etc.
Filter Incoming Mail
by example, setting it to lower case subject = subject.tolocalelowercase(); // then we rebuild a subject objet by rencoding the string // and assign it to the message headers and we're done amsghdr.subject = mimeconvert.encodemimepartiistr_utf8(subject, false, "utf-8", 0, 72); } } }; function init() { var
notificationservice = components.classes["@mozilla.org/messenger/msg
notificationservice;1"] .getservice(components.interfaces.nsimsgfolder
notificationservice);
notificationservice.addlistener(newmaillistener,
notificationservice.msgadded); } addeventlistener("load", init, true); have a look to nsimsgdbhdr to get the full list of properties to be modified.
Ambient Light Events - Web APIs
when the browser gets such a
notification, it fires a devicelightevent event that provides information about the exact light intensity (in lux units).
Client.url - Web APIs
example self.addeventlistener('
notificationclick', function(event) { console.log('on
notification click: ', event.
notification.tag); event.
notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: 'window' }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment ...
Event.preventDefault() - Web APIs
ion, which looks at the pressed key and decides whether to allow it: function checkname(evt) { var charcode = evt.charcode; if (charcode != 0) { if (charcode < 97 || charcode > 122) { evt.preventdefault(); displaywarning( "please use lowercase letters only." + "\n" + "charcode: " + charcode + "\n" ); } } } the displaywarning() function presents a
notification of a problem.
msAudioCategory - Web APIs
alert looping or longer running alert sounds: alarms ring tones ringing
notification sounds that need to attenuate existing audio no backgroundcapablemedia for audio that needs to continue playing in the background.
Recommended Drag Types - Web APIs
dragging files to an operating system folder you may want to add a file to an existing drag event session, and you may also want to write the file to disk when the drop operation happens over a folder in the operating system when your code receives
notification of the target folder's location.
IDBDatabase.transaction() - Web APIs
for a complete example, see our to-do
notifications app (view example live.) var db; // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBDatabase - Web APIs
for a complete working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the idbdatabase object, // when the database is opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>dat...
IDBFactory.open() - Web APIs
for a full working example, see our to-do
notifications app (view example live.) var note = document.queryselector("ul"); // in the following line, you should include the prefixes // of implementations you want to test.
IDBFactory - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // in the following line, you should include the prefixes of implementations you want to test.
IDBObjectStore.add() - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBObjectStore.autoIncrement - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBObjectStore.clear() - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBObjectStore.createIndex() - Web APIs
for a full working example, see our to-do
notifications app (view example live.) var db; // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // two event handlers for opening the database.
IDBObjectStore.delete() - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBObjectStore.deleteIndex() - Web APIs
for a full working example, see our to-do
notifications app (view example live.) var db; // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</...
IDBObjectStore.get() - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBObjectStore.indexNames - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBObjectStore.keyPath - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBObjectStore.name - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBObjectStore.put() - Web APIs
for a full working example, see our to-do
notifications app (view example live.) const title = "walk dog"; // open up a transaction as usual const objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title const objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = () => { // grab the data object returned as the result const da...
IDBObjectStore.transaction - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBObjectStore - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in db.
IDBOpenDBRequest - Web APIs
for a full working example, see our to-do
notifications app (view example live.) var db; // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these event handlers act on the database being opened.
IDBRequest.error - Web APIs
for a full working example, see our to-do
notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the do-do list with the specified title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretit...
IDBRequest.onerror - Web APIs
for a full working example, see our to-do
notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data ...
IDBRequest.onsuccess - Web APIs
for a full working example, see our to-do
notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data ...
IDBRequest.readyState - Web APIs
for a full working example, see our to-do
notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data ...
IDBRequest.result - Web APIs
for a full working example, see our to-do
notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data ...
IDBRequest.source - Web APIs
for a full working example, see our to-do
notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as its title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data =...
IDBRequest.transaction - Web APIs
for a full working example, see our to-do
notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data ...
IDBRequest - Web APIs
for a full working example, see our to-do
notifications app (view example live.) var db; // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being // opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised...
IDBTransaction.abort() - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBTransaction.db - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBTransaction.error - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBTransaction.mode - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBTransaction.objectStore() - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBTransaction.onabort - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBTransaction.oncomplete - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBTransaction.onerror - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBTransaction - Web APIs
for a full working example, see our to-do
notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db // variable.
IDBVersionChangeEvent.newVersion - Web APIs
for a full working example, see our to-do
notifications app (view example live.) var note = document.queryselector("ul"); // in the following line, you should include the prefixes of // implementations you want to test.
IDBVersionChangeEvent - Web APIs
for a full working example, see our to-do
notifications app (view example live.) var note = document.queryselector("ul"); // in the following line, you should include the prefixes of implementations you want to test.
IndexedDB API - Web APIs
to-do
notifications (view example live): the reference application for the examples in the reference docs.
Intersection Observer API - Web APIs
it uses a vendor-provided library to manage the advertisements placed periodically throughout the page, has animated graphics here and there, and uses a custom library that draws
notification boxes and the like.
MediaQueryListListener - Web APIs
a mediaquerylist object maintains a list of media queries on a document, and handles sending
notifications to listeners when the media queries on the document change.
msSaveBlob - Web APIs
return value true is returned as long as the download
notification bar is displayed, or false if a failure occured.
msSaveOrOpenBlob - Web APIs
return value true is returned as long as the download
notification bar is displayed, or false if a failure occurred.
PaymentResponse.complete() - Web APIs
unknown the success or failure status of the transaction is unknown or irrelevant, and the user agent should not present any
notification, even if it normally would.
Permissions - Web APIs
opera android full support 30safari ios no support nosamsung internet android full support 4.0
notifications permissionchrome full support 43edge full support 79firefox ?
Proximity Events - Web APIs
when the browser gets such a
notification, it fires a deviceproximityevent for any change, and a userproximityevent event in the case of a more rough change.
PushMessageData - Web APIs
examples self.addeventlistener('push', function(event) { var obj = event.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { fire
notification(obj, event); port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); specifications specification status comment push apithe definition of 'pushmessagedata' in that specification.
RTCRtpStreamStats - Web APIs
slicount the number of times the receiver notified the sender that one or more consecutive (in scan order) encoded video macroblocks have been lost or corrupted; this
notification is sent by the receiver to the sender using a slice loss indication (sli) packet.
Resize Observer API - Web APIs
the resize observer api provides a performant mechanism by which code can monitor an element for changes to its size, with
notifications being delivered to the observer each time the size changes.
StorageManager.estimate() - Web APIs
this variance is based on factors such as: how often the user visits public site popularity data user engagement signals like bookmarking, adding to homescreen, or accepting push
notifications example in this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user.
Storage API - Web APIs
site storage—the data stored for a web site which is managed by the storage standard—includes: indexeddb databases cache api data service worker registrations web storage api data managed using window.localstorage history state information saved using history.pushstate() application caches
notification data other kinds of site-accessible, site-specific data that may be maintained site storage units the site storage system described by the storage standard and interacted with using the storage api consists of a single site storage unit for each origin.
WindowClient.focus() - Web APIs
example self.addeventlistener('
notificationclick', function(event) { console.log('on
notification click: ', event.
notification.tag); event.
notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == ...
WindowClient.focused - Web APIs
example self.addeventlistener('
notificationclick', function(event) { console.log('on
notification click: ', event.
notification.tag); event.
notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) { if(!client.focused) return client.focus(); } } } if (clients.openwindow) return clients.openwindow(...
WindowClient - Web APIs
example self.addeventlistener('
notificationclick', function(event) { console.log('on
notification click: ', event.
notification.tag); event.
notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == ...
WindowEventHandlers.onhashchange - Web APIs
function locationhashchanged() { if (location.hash === '#cool-feature') { console.log("you're visiting a cool feature!"); } } window.onhashchange = locationhashchanged; using an event listener this example uses an event listener to log a
notification whenever the hash has changed.
WorkerNavigator.permissions - Web APIs
examples self.navigator.permissions.query({name:'
notifications'}).then(function(result) { if (result.state === 'granted') { show
notification(); } else if (result.state === 'prompt') { request
notificationpermission() } }); specification specification status comment permissions working draft initial definition.
ARIA live regions - Accessibility
using javascript, it is possible to dynamically change parts of a page without requiring the entire page to reload — for instance, to update a list of search results on the fly, or to display a discreet alert or
notification which does not require user interaction.
ARIA Test Cases - Accessibility
screen magnifier should show the focused button or emulate any other standard behavior found in
notification dialogs in windows or respective operating systems.
Accessibility documentation index - Accessibility
7 aria live regions aria, accessibility, arialive using javascript, it is possible to dynamically change parts of a page without requiring the entire page to reload — for instance, to update a list of search results on the fly, or to display a discreet alert or
notification which does not require user interaction.
Demos of open web technologies
n garden css floating logo "mozilla" paperfold css blockout rubik's cube pure css slides planetarium (source code) loader with blend modes text reveal with clip-path ambient shadow with custom properties luminiscent vial css-based single page application (source code) transformations impress.js (source code) games ioquake3 (source code) kai 'opua (source code) web apis
notifications api html5
notifications (source code) web audio api web audio fireworks oscope.js - javascript oscilloscope html5 web audio showcase (source code) html5 audio visualizer (source code) graphical filter editor and visualizer (source code) file api slide my text - presentation from plain text files web workers web worker fractals photo editor coral generator raytracer h...
Index - Event reference
events can represent everything from basic user interactions to automated
notifications of things happening in the rendering model.
Guide to Web APIs - Developer guides
information api ppage visibility apipayment request apiperformance apiperformance timeline apipermissions apipointer eventspointer lock apiproximity events push api rresize observer apiresource timing apisserver sent eventsservice workers apistoragestorage access apistreams ttouch eventsuurl apivvibration apivisual viewport wweb animationsweb audio apiweb authentication apiweb crypto apiweb
notificationsweb storage apiweb workers apiwebglwebrtcwebvttwebxr device apiwebsockets api ...
CSP: report-uri - HTTP
"\n\nfurther cps violations will be logged to the following log file, but no further email
notifications will be sent until this log file is deleted:\n\n" .
getter - JavaScript
get notifier() { delete this.notifier; return this.notifier = document.getelementbyid('bookmarked-
notification-anchor'); }, for firefox code, see also the xpcomutils.jsm code module, which defines the definelazygetter() function.
PWA developer guide - Progressive web apps (PWAs)
using service workers to run offline description alerting the user using
notifications description creating a web app from an existing site description advanced topics pushing data from the server to your web application some description resource management description integration with the host device description security and privacy description gaming topics for web app developers description polishing web apps web api equivalents for common native apis s...