Improve notification documentation
Ref: https://gitlab.gnome.org/GNOME/gnome-shell/issues/294
This commit is contained in:
parent
04f61567ba
commit
fdaddbd1e0
@ -27,6 +27,7 @@ function _fixMarkup(text, allowMarkup) {
|
|||||||
|
|
||||||
// Support <b>, <i>, and <u>, escape anything else
|
// Support <b>, <i>, and <u>, escape anything else
|
||||||
// so it displays as raw markup.
|
// so it displays as raw markup.
|
||||||
|
// Ref: https://developer.gnome.org/notification-spec/#markup
|
||||||
_text = _text.replace(/<(?!\/?[biu]>)/g, '<');
|
_text = _text.replace(/<(?!\/?[biu]>)/g, '<');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -315,10 +315,10 @@ var NotificationApplicationPolicy = new Lang.Class({
|
|||||||
// You can add a secondary icon to the banner with 'secondaryGIcon'. There
|
// You can add a secondary icon to the banner with 'secondaryGIcon'. There
|
||||||
// is no fallback for this icon.
|
// is no fallback for this icon.
|
||||||
//
|
//
|
||||||
// If @params contains 'bannerMarkup', with the value %true, then
|
// If @params contains 'bannerMarkup', with the value %true, a subset (<b>,
|
||||||
// the corresponding element is assumed to use pango markup. If the
|
// <i> and <u>) of the markup in [1] will be interpreted within @banner. If
|
||||||
// parameter is not present for an element, then anything that looks
|
// the parameter is not present, then anything that looks like markup
|
||||||
// like markup in that element will appear literally in the output.
|
// in @banner will appear literally in the output.
|
||||||
//
|
//
|
||||||
// If @params contains a 'clear' parameter with the value %true, then
|
// If @params contains a 'clear' parameter with the value %true, then
|
||||||
// the content and the action area of the notification will be cleared.
|
// the content and the action area of the notification will be cleared.
|
||||||
@ -328,6 +328,8 @@ var NotificationApplicationPolicy = new Lang.Class({
|
|||||||
// If @params contains 'soundName' or 'soundFile', the corresponding
|
// If @params contains 'soundName' or 'soundFile', the corresponding
|
||||||
// event sound is played when the notification is shown (if the policy for
|
// event sound is played when the notification is shown (if the policy for
|
||||||
// @source allows playing sounds).
|
// @source allows playing sounds).
|
||||||
|
//
|
||||||
|
// [1] https://developer.gnome.org/notification-spec/#markup
|
||||||
var Notification = new Lang.Class({
|
var Notification = new Lang.Class({
|
||||||
Name: 'Notification',
|
Name: 'Notification',
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user