github.com/e154/smart-home@v0.17.2-0.20240311175135-e530a6e5cd45/doc/content/ru/docs/plugins/notify/html5_notify.md (about) 1 2 --- 3 title: "HTML5 Уведомления" 4 linkTitle: "html5_notify" 5 date: 2021-10-20 6 description: > 7 8 --- 9 10 HTML5 уведомление - это способ показать пользователю информацию на веб-странице без перезагрузки или перехода на другую страницу. Уведомления могут содержать текст, изображения, звук или видео и появляются в правом нижнем углу экрана. Уведомления на HTML5 используют API, который позволяет веб-приложениям отправлять уведомления браузеру с помощью JavaScript 11 12 ### Атрибуты 13 * userIDS 14 * title 15 * body 16 17 ### javascript свойства 18 19 ---------------- 20 21 ### Новое сообщение 22 23 создает объект сообщения 24 25 ```coffeescript 26 msg = notifr.newMessage(); 27 msg.type = 'html5_notify'; 28 msg.attributes = { 29 'userIDS': '14', 30 'title': 'Lorem Ipsum is simply', 31 'body': 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum' 32 }; 33 34 ``` 35 | значение | описание | 36 |-------------|---------| 37 | newMessage() | метод | 38 | msg | type: Object (Message) | 39 40 ---------------- 41 42 ### пример кода 43 44 ```coffeescript 45 # html5_notify 46 # ################################## 47 48 sendMsg =()-> 49 msg = notifr.newMessage(); 50 msg.type = 'html5_notify'; 51 msg.attributes = { 52 'userIDS': '14', 53 'title': 'Lorem Ipsum is simply', 54 'body': 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum' 55 }; 56 notifr.send(msg); 57 58 sendMsg() 59 ``` 60