Notification: body-Eigenschaft
        
        
          Limited availability
        
        
        
          
                
              
                
              
                
              
        
        
      
      This feature is not Baseline because it does not work in some of the most widely-used browsers.
Sicherer Kontext: Diese Funktion ist nur in sicheren Kontexten (HTTPS) in einigen oder allen unterstützenden Browsern verfügbar.
Hinweis: Diese Funktion ist in Web Workers verfügbar.
Die schreibgeschützte body-Eigenschaft des Notification-Interfaces gibt den Textkörper der Benachrichtigung an, wie in der body-Option des Notification()-Konstruktors angegeben.
Wert
Ein String.
Beispiele
js
function spawnNotification(theBody, theIcon, theTitle) {
  const options = {
    body: theBody,
    icon: theIcon,
  };
  const n = new Notification(theTitle, options);
  console.log(n.body);
}
Spezifikationen
| Specification | 
|---|
| Notifications API> # dom-notification-body>  | 
            
Browser-Kompatibilität
Loading…