{"id":183630,"date":"2013-06-17T20:45:03","date_gmt":"2013-06-17T16:45:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=183630"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=183630","title":{"rendered":"<span class=\"post_title\">HTML 5 Notifications API<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" align=\"right\" src=\"http:\/\/habrastorage.org\/storage2\/be4\/0b0\/e40\/be40b0e40327fe4e4f750bc85c210044.jpg\"\/><br \/>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e <a href=\"http:\/\/www.w3.org\/TR\/notifications\/\">HTML Notification API<\/a>.<\/p>\n<h4>\u041a\u0430\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 Notification API<\/h4>\n<p>  API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043a\u043e\u043d\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438 \u0442\u0435\u043a\u0441\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445<\/h4>\n<p>  <\/p>\n<ul>\n<li>Safari 6<\/li>\n<li>Chrome 27<\/li>\n<li>Firefox 22<\/li>\n<\/ul>\n<p>  Opera 15 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 Notifications API, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 Notification.<br \/>  \u041d\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f <a href=\"http:\/\/caniuse.com\/#feat=notifications\">\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/a>.<br \/>  \u0412 \u0434\u0432\u0438\u0436\u043a\u0435 webkit \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0440\u0430\u044f \u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 webkitNotifications.<\/p>\n<h4>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h4>\n<p>  \u0426\u0438\u043a\u043b \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:  <\/p>\n<ol>\n<li>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443;<\/li>\n<li>\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430;<\/li>\n<li>\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435.<\/li>\n<\/ol>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0412\u0430\u0448\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<h5>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h5>\n<p>  \u0412\u0441\u0435\u0433\u043e \u0435\u0441\u0442\u044c 3 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f:  <\/p>\n<ul>\n<li>Default<\/li>\n<li>Denied<\/li>\n<li>Granted<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044f \u043d\u0430\u0448\u0435\u043b 3 \u0441\u043f\u043e\u0441\u043e\u0431\u0430:<\/p>\n<p>  1. \u0427\u0435\u0440\u0435\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 Notification.permission.<\/p>\n<pre><code class=\"javascript\">switch ( Notification.permission.toLowerCase() ) {     case &quot;granted&quot;:         \/\/ \u043c\u043e\u0436\u043d\u043e         break;      case &quot;denied&quot;:         \/\/ \u043d\u0435\u043b\u044c\u0437\u044f         break;      case &quot;default&quot;:         \/\/ \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u044c } <\/code><\/pre>\n<p>  \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438:  <\/p>\n<ul>\n<li>\u0412 google chrome \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e permission \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e( \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u2014 <i>\u00abThe static permission attribute must return permission\u00bb<\/i> ).<\/li>\n<\/ul>\n<p>  2. \u0427\u0435\u0440\u0435\u0437 \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443  <\/p>\n<pre><code class=\"javascript\">var currentPermission; Notification.requestPermission( function(result) { currentPermission = result  } ); <\/code><\/pre>\n<p>  \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438:<br \/>  \u0415\u0441\u043b\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 default, \u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0443\u0432\u0438\u0434\u0438\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u0441\u0430\u0439\u0442\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f. \u041f\u043e\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0432\u044b\u0431\u0435\u0440\u0435\u0442 \u0447\u0442\u043e \u043b\u0438\u0431\u043e, callback \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0432\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0441\u0442\u0430\u0442\u0443\u0441.<\/p>\n<p>  \u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0445\u0438\u043d\u0442:<br \/>  \u041c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 default \u0447\u0435\u0440\u0435\u0437 requestPermission \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u0432 callback.  <\/p>\n<pre><code class=\"javascript\">var permission,      timer = setTimeout( function() { permission = &quot;default&quot; }, 500 ); Notification.requestPermission( function(state){ clearTimeout(timer); permission = state } ); <\/code><\/pre>\n<p>  3. \u0427\u0435\u0440\u0435\u0437 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f<br \/>  \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0437\u0436\u0435.  <\/p>\n<pre><code class=\"javascript\">var notify = new Notification(&quot;test&quot;); notify.onerror = function(){      console.log(&quot;permission state = default or denied&quot;); }; <\/code><\/pre>\n<p>   \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438:<br \/>  \u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438 \u0434\u0432\u0443\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u0445.<\/p>\n<h5>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h5>\n<p>  Notification.requestPermission \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0438 default \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442.  <\/p>\n<pre><code class=\"javascript\">Notification.requestPermission( newMessage );  function newMessage(permission) {     if( permission != &quot;granted&quot; ) return false;     var notify = new Notification(&quot;Thanks for letting notify you&quot;); }; <\/code><\/pre>\n<h5>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f<\/h5>\n<p>  \u0412\u043e\u0442 \u0438 \u0434\u043e\u0448\u043b\u0438 \u0434\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439:  <\/p>\n<pre><code class=\"javascript\">var mailNotification = new Notification(&quot;\u0410\u043d\u0434\u0440\u0435\u0439 \u0427\u0435\u0440\u043d\u044b\u0448\u0451\u0432&quot;, {     tag : &quot;ache-mail&quot;,     body : &quot;\u041f\u0440\u0438\u0432\u0435\u0442, \u0432\u044b\u0441\u044b\u043b\u0430\u044e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u043f\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0443...&quot;,     icon : &quot;http:\/\/habrastorage.org\/storage2\/cf9\/50b\/e87\/cf950be87f8c34e63c07217a009f1d17.jpg&quot; }); <\/code><\/pre>\n<p>  \u0418 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/e1e\/6e0\/457\/e1e6e0457e17ddf6e1cb2e91f3fde52a.jpg\"\/><\/p>\n<p>  \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f:<br \/>  <i>\u00ab\u0410\u043d\u0434\u0440\u0435\u0439 \u0427\u0435\u0440\u043d\u044b\u0448\u0451\u0432\u00bb \u2014 \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f ( \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 )<\/i><br \/>  \u041e\u0431\u0440\u0435\u0437\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445 \u0438 \u041e\u0421 \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u0441\u044f 15-\u044e \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438.<\/p>\n<p>  tag \u2014 \u0442\u0435\u0433, \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0439\u0449\u0438\u0439 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0443.<br \/>  \u0414\u0435\u043b\u0430\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0442\u0435\u0433\u0430\u043c\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c\u0438.<\/p>\n<p>  body \u2014 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.<br \/>  \u041e\u0431\u0440\u0435\u0437\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445 \u0438 \u041e\u0421 \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u0441\u044f 20-\u044e \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438.<\/p>\n<p>  icon \u2014 \u0438\u043a\u043e\u043d\u043a\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.<br \/>  \u041d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432 chrome \u0438 safari \u043f\u043e\u0434 OS X.<\/p>\n<h5>\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439<\/h5>\n<p>  \u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u0435\u0442 4 \u0441\u043e\u0431\u044b\u0442\u0438\u044f:<\/p>\n<p>  <b>onclick<\/b><br \/>  \u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043d\u0430 \u0442\u0435\u043b\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f. \u041d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043d\u0430 \u043a\u0440\u0435\u0441\u0442\u0438\u043a \u0438\u043b\u0438 \u043a\u043d\u043e\u043f\u043a\u0443 close ( mac os ).<\/p>\n<p>  <b>onshow<\/b><br \/>  \u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438 \u043f\u043e\u043a\u0430\u0437\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  <b>onerror<\/b><br \/>  \u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u044d\u0442\u043e ( default, denied ).<\/p>\n<p>  <b>onclose<\/b><br \/>  \u0421\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043e\u043a\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f. <br \/>  \u0415\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 chrome \u043d\u0430 windows. \u0421\u043e\u0431\u044b\u0442\u0438\u0435 close \u043d\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043d\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435.<\/p>\n<h4>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u0412 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \\ \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0431 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f\u0445.<br \/>  Chrome: preferences \u2014 settings \u2014 show advanced settings \u2014 privacy \u2014 content settings \u2014 notifications.<br \/>  Safari: preferences \u2014 notifications.<br \/>  Firefox: \u043f\u0440\u0430\u0432\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043d\u043e\u0439 \u043c\u044b\u0448\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u2014 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u2014 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  <a href=\"http:\/\/delch.github.io\/notifications-api\/\">\u0421\u0441\u044b\u043b\u043a\u0430<\/a> \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/183630\/\"> http:\/\/habrahabr.ru\/post\/183630\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" align=\"right\" src=\"http:\/\/habrastorage.org\/storage2\/be4\/0b0\/e40\/be40b0e40327fe4e4f750bc85c210044.jpg\"\/><br \/>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e <a href=\"http:\/\/www.w3.org\/TR\/notifications\/\">HTML Notification API<\/a>.<\/p>\n<h4>\u041a\u0430\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 Notification API<\/h4>\n<p>  API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043a\u043e\u043d\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438 \u0442\u0435\u043a\u0441\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445<\/h4>\n<p>  <\/p>\n<ul>\n<li>Safari 6<\/li>\n<li>Chrome 27<\/li>\n<li>Firefox 22<\/li>\n<\/ul>\n<p>  Opera 15 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 Notifications API, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 Notification.<br \/>  \u041d\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f <a href=\"http:\/\/caniuse.com\/#feat=notifications\">\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/a>.<br \/>  \u0412 \u0434\u0432\u0438\u0436\u043a\u0435 webkit \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0440\u0430\u044f \u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 webkitNotifications.<\/p>\n<h4>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h4>\n<p>  \u0426\u0438\u043a\u043b \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:  <\/p>\n<ol>\n<li>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443;<\/li>\n<li>\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430;<\/li>\n<li>\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435.<\/li>\n<\/ol>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-183630","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/183630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=183630"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/183630\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=183630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=183630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=183630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}