{"id":231845,"date":"2014-08-10T13:37:03","date_gmt":"2014-08-10T09:37:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=231845"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=231845","title":{"rendered":"<span class=\"post_title\">HTML-\u0438\u043c\u043f\u043e\u0440\u0442 \u2014 include \u0434\u043b\u044f \u0432\u0435\u0431\u0430: \u0447\u0430\u0441\u0442\u044c 2<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       \u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u00ab<a href=\"http:\/\/html5rocks.com\/en\/tutorials\/webcomponents\/imports\/#deliver-webcomponents\">HTML Imports #include for the web<\/a>\u00bb, Eric Bidelman.<\/p>\n<p>  <a href=\"http:\/\/habrahabr.ru\/post\/230877\/\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430.<\/a><\/p>\n<h3>\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0431-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/h3>\n<p>  HTML-\u0438\u043c\u043f\u043e\u0440\u0442 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0435\u0431-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u042d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u044b\u0445 <a href=\"http:\/\/www.html5rocks.com\/webcomponents\/template\/\">HTML <code>&lt;template&gt;<\/code><\/a>, \u0442\u0430\u043a \u0438 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0445 <a href=\"http:\/\/www.html5rocks.com\/tutorials\/webcomponents\/customelements\/#registering\">\u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432<\/a> \u0441 \u0442\u0435\u043d\u0435\u0432\u044b\u043c DOM [<a href=\"http:\/\/www.html5rocks.com\/tutorials\/webcomponents\/shadowdom\/\">1<\/a>, <a href=\"http:\/\/www.html5rocks.com\/tutorials\/webcomponents\/shadowdom-201\/\">2<\/a>, <a href=\"http:\/\/www.html5rocks.com\/tutorials\/webcomponents\/shadowdom-301\/\">3<\/a>]. \u041a\u043e\u0433\u0434\u0430 \u044d\u0442\u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432\u043c\u0435\u0441\u0442\u0435, \u0438\u043c\u043f\u043e\u0440\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f <a href=\"http:\/\/en.cppreference.com\/w\/cpp\/preprocessor\/include\">\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/a> \u0432\u0435\u0431-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/h4>\n<p>  <a href=\"http:\/\/www.html5rocks.com\/tutorials\/webcomponents\/template\/\">HTML-\u0448\u0430\u0431\u043b\u043e\u043d\u044b<\/a> \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u0433\u0434\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0438\u043c\u043f\u043e\u0440\u0442. \u0422\u044d\u0433 <code>&lt;template&gt;<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043d\u043e\u0441\u0438\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0428\u0430\u0431\u043b\u043e\u043d\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0442\u0435\u043c, \u0447\u0442\u043e \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043e \u0438\u0445 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 JS \u043a\u043e\u0434\u0430.<\/p>\n<p>  import.html  <\/p>\n<pre><code class=\"html\">&lt;template&gt;   &lt;h1&gt;Hello World!&lt;\/h1&gt;   &lt;!-- Img is not requested until the &lt;template&gt; goes live. --&gt;   &lt;img src=&quot;&quot;&gt;   &lt;script&gt;alert(&quot;Executed when the template is activated.&quot;);&lt;\/script&gt; &lt;\/template&gt; <\/code><\/pre>\n<p>  index.html  <\/p>\n<pre><code class=\"html\">&lt;head&gt;   &lt;link rel=&quot;import&quot; href=&quot;import.html&quot;&gt; &lt;\/head&gt; &lt;body&gt;   &lt;div id=&quot;container&quot;&gt;&lt;\/div&gt;   &lt;script&gt;     var link = document.querySelector('link[rel=&quot;import&quot;]');      \/\/ Clone the &lt;template&gt; in the import.     var template = link.import.querySelector('template');     var clone = document.importNode(template.content, true);      document.querySelector('#container').appendChild(clone);   &lt;\/script&gt; &lt;\/body&gt; <\/code><\/pre>\n<p>  <\/p>\n<h4>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432<\/h4>\n<p>  <a href=\"http:\/\/www.html5rocks.com\/en\/tutorials\/webcomponents\/imports\/tutorials\/webcomponents\/customelements\/\">\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b<\/a> \u044d\u0442\u043e \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0432\u0435\u0431-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u0442\u0441\u044f \u0441 HTML-\u0438\u043c\u043f\u043e\u0440\u0442\u043e\u043c. \u041a\u0430\u043a \u043c\u044b \u0437\u043d\u0430\u0435\u043c <a href=\"http:\/\/www.html5rocks.com\/en\/tutorials\/webcomponents\/imports\/#includejs\">\u0432 \u0438\u043c\u043f\u043e\u0440\u0442\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u044b<\/a>, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430. \u041d\u0430\u0437\u043e\u0432\u0435\u043c \u044d\u0442\u043e \u0430\u0432\u0442\u043e\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>  elements.html  <\/p>\n<pre><code class=\"html\">&lt;script&gt;   \/\/ Define and register &lt;say-hi&gt;.   var proto = Object.create(HTMLElement.prototype);    proto.createdCallback = function() {     this.innerHTML = 'Hello, &lt;b&gt;' +                      (this.getAttribute('name') || '?') + '&lt;\/b&gt;';   };    document.registerElement('say-hi', {prototype: proto});    \/\/ Define and register &lt;shadow-element&gt; that uses Shadow DOM.   var proto2 = Object.create(HTMLElement.prototype);    proto2.createdCallback = function() {     var root = this.createShadowRoot();     root.innerHTML = &quot;&lt;style&gt;::content &gt; *{color: red}&lt;\/style&gt;&quot; +                      &quot;I'm a &quot; + this.localName +                      &quot; using Shadow DOM!&lt;content&gt;&lt;\/content&gt;&quot;;   };   document.registerElement('shadow-element', {prototype: proto2}); &lt;\/script&gt; <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 (\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442) \u0434\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430: <code>&lt;say-hi&gt;<\/code> \u0438 <code>&lt;shadow-element&gt;<\/code>. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u044f\u043c\u043e \u0432 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u0441\u043b\u043e\u0432\u0438\u0439.<\/p>\n<p>  index.html  <\/p>\n<pre><code class=\"html\">&lt;head&gt;   &lt;link rel=&quot;import&quot; href=&quot;elements.html&quot;&gt; &lt;\/head&gt; &lt;body&gt;   &lt;say-hi name=&quot;Eric&quot;&gt;&lt;\/say-hi&gt;   &lt;shadow-element&gt;     &lt;div&gt;( I'm in the light dom )&lt;\/div&gt;   &lt;\/shadow-element&gt; &lt;\/body&gt; <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 HTML-\u0438\u043c\u043f\u043e\u0440\u0442 \u0432 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0431-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<\/p>\n<h4>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u043c<\/h4>\n<p>  \u042d\u0439, \u0442\u044b, \u044f \u0432\u0438\u0436\u0443 \u0442\u0435\u0431\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u0438\u043c\u043f\u043e\u0440\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u044f \u0432\u043b\u043e\u0436\u0438\u043b \u0438\u043c\u043f\u043e\u0440\u0442 \u0432\u043d\u0443\u0442\u0440\u044c \u0438\u043c\u043f\u043e\u0440\u0442\u0430<a href=\"#first-annotation\"><sup>1<\/sup><\/a>.<\/p>\n<h5>\u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0438\u043c\u043f\u043e\u0440\u0442<\/h5>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0438\u043c\u043f\u043e\u0440\u0442.<\/p>\n<p>  \u0421\u043d\u0438\u0437\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 <a href=\"http:\/\/polymer-project.org\/\">\u041f\u043e\u043b\u0438\u043c\u0435\u0440\u0430<\/a>. \u042d\u0442\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <code>tab (&lt;polymer-ui-tabs&gt;)<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b <code>layout<\/code> \u0438 <code>selector<\/code>. \u042d\u0442\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 HTML-\u0438\u043c\u043f\u043e\u0440\u0442\u0430.<\/p>\n<p>  polymer-ui-tabs.html  <\/p>\n<pre><code class=\"html\">&lt;link rel=&quot;import&quot; href=&quot;polymer-selector.html&quot;&gt; &lt;link rel=&quot;import&quot; href=&quot;polymer-flex-layout.html&quot;&gt;  &lt;polymer-element name=&quot;polymer-ui-tabs&quot; extends=&quot;polymer-selector&quot; ...&gt;   &lt;template&gt;     &lt;link rel=&quot;stylesheet&quot; href=&quot;polymer-ui-tabs.css&quot;&gt;     &lt;polymer-flex-layout&gt;&lt;\/polymer-flex-layout&gt;     &lt;shadow&gt;&lt;\/shadow&gt;   &lt;\/template&gt; &lt;\/polymer-element&gt; <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442:  <\/p>\n<pre><code class=\"html\">&lt;link rel=&quot;import&quot; href=&quot;polymer-ui-tabs.html&quot;&gt; &lt;polymer-ui-tabs&gt;&lt;\/polymer-ui-tabs&gt; <\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432\u044b\u0439\u0434\u0435\u0442 \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>&lt;polymer-selector2&gt;<\/code>, \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u043c\u0435\u043d\u0438\u0442\u044c <code>&lt;polymer-selector&gt;<\/code> \u0438 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0443 \u0438 \u0432\u0435\u0431-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c, \u044d\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435 \u0437\u0430\u0434\u0435\u043d\u0435\u0442 \u043a\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <code>polymer-ui-tabs<\/code>.<br \/>  <a name=\"dependecies\"><\/a>  <\/p>\n<h5>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438<\/h5>\n<p>  \u041a\u0430\u043a \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u0435\u0441\u043b\u0438 \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c JQuery, \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c. \u041d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u0435\u0441\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u043d\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443? \u041d\u0435\u0442, \u0435\u0441\u043b\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c HTML-\u0438\u043c\u043f\u043e\u0440\u0442! \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0441\u0430\u043c\u043e \u043f\u043e \u0441\u0435\u0431\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<p>  \u041e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u0438\u043c\u043f\u043e\u0440\u0442, \u0432\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0437\u0431\u0435\u0433\u0430\u0435\u0442\u0435 \u0438\u0445 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043f\u0430\u0440\u0441\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \u0421\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u043d\u0435\u043c \u0442\u043e\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c jquery.html, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0441\u0430\u043c JQuery.<\/p>\n<p>  jquery.html  <\/p>\n<pre><code class=\"html\">&lt;script src=&quot;http:\/\/cdn.com\/jquery.js&quot;&gt;&lt;\/script&gt; <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445:<\/p>\n<p>  import2.html  <\/p>\n<pre><code class=\"html\">&lt;link rel=&quot;import&quot; href=&quot;jquery.html&quot;&gt; &lt;div&gt;Hello, I'm import 2&lt;\/div&gt; <\/code><\/pre>\n<p>  ajax-element.html  <\/p>\n<pre><code class=\"html\">&lt;link rel=&quot;import&quot; href=&quot;jquery.html&quot;&gt; &lt;link rel=&quot;import&quot; href=&quot;import2.html&quot;&gt;  &lt;script&gt;   var proto = Object.create(HTMLElement.prototype);    proto.makeRequest = function(url, done) {     return $.ajax(url).done(function() {       done();     });   };    document.registerElement('ajax-element', {prototype: proto}); &lt;\/script&gt; <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f, \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c jquery.html:<\/p>\n<pre><code class=\"html\">&lt;head&gt;   &lt;link rel=&quot;import&quot; href=&quot;jquery.html&quot;&gt;   &lt;link rel=&quot;import&quot; href=&quot;ajax-element.html&quot;&gt; &lt;\/head&gt; &lt;body&gt;  ...  &lt;script&gt;   $(document).ready(function() {     var el = document.createElement('ajax-element');     el.makeRequest('http:\/\/example.com');   }); &lt;\/script&gt; &lt;\/body&gt;&lt;source lang=&quot;html&quot;&gt;  <\/code><\/pre>\n<p>  \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e jquery.html \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445, \u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0432 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044c network:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.html5rocks.com\/en\/tutorials\/webcomponents\/imports\/requests-devtools.png\" alt=\"image\"\/><\/p>\n<h3>\u0421\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>  HTML-\u0438\u043c\u043f\u043e\u0440\u0442 \u2014 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u043d\u043e \u043a\u0430\u043a \u0438 \u0441 \u043b\u044e\u0431\u043e\u0439 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0431-\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0435\u0439, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441 \u0443\u043c\u043e\u043c \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043a \u0435\u0451 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e. \u041b\u0443\u0447\u0448\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u043b. \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0449\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0440\u0430\u0431\u043e\u0442\u0430\u044f \u0441 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u043c.<\/p>\n<h4>\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0430<\/h4>\n<p>  \u041e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0438\u0445 \u0432 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430.<\/p>\n<p>  <a href=\"https:\/\/github.com\/Polymer\/vulcanize\">Vulcanize<\/a>, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043e\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439 <a href=\"http:\/\/www.polymer-project.org\/\">\u041f\u043e\u043b\u0438\u043c\u0435\u0440\u0430<\/a>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438\u0437 npm. \u041e\u043d \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443 \u0432\u0441\u0435\u0445 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u044d\u0442\u043e, \u043f\u043e \u0441\u0443\u0442\u0438, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0432\u0435\u0431-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b. \u0414\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0438 <a href=\"http:\/\/www.polymer-project.org\/\">\u041f\u043e\u043b\u0438\u043c\u0435\u0440\u0430<\/a>.<\/p>\n<h4>\u0411\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u043e\u0435 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0430<\/h4>\n<p>  HTML-\u0438\u043c\u043f\u043e\u0440\u0442 \u0442\u0430\u043a\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0418\u043c\u043f\u043e\u0440\u0442 <code>http:\/\/cdn.com\/bootstrap.html<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043d\u043e \u043e\u043d\u0438 \u0442\u0430\u043a \u0436\u0435 \u043a\u0435\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f.<\/p>\n<h5>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0432 DOM<\/h5>\n<p>  \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440 \u043f\u043e\u043a\u0430 \u043e\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u0442\u0438\u043b\u0435\u0439:<\/p>\n<pre><code class=\"javascript\">var link = document.createElement('link'); link.rel = 'stylesheet'; link.href = 'styles.css'; <\/code><\/pre>\n<p>  \u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 styles.css, \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440 \u043f\u043e\u043a\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>link<\/code> \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 DOM:<\/p>\n<pre><code class=\"javascript\">document.head.appendChild(link); \/\/ browser requests styles.css <\/code><\/pre>\n<p>  \u0414\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u044d\u0442\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430:<\/p>\n<pre><code class=\"javascript\">var h2 = document.createElement('h2'); h2.textContent = 'Booyah!'; <\/code><\/pre>\n<p>  \u042d\u043b\u0435\u043c\u0435\u043d\u0442 <code>h2<\/code> \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442, \u043f\u043e\u043a\u0430 \u0432\u044b \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 DOM.<\/p>\n<p>  \u042d\u0442\u0430 \u0436\u0435 \u0438\u0434\u0435\u044f \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0439 \u0438 \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u043a\u0430 \u0432\u044b \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u0438\u0445 \u0432 DOM, \u043e\u043d\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u044e\u0442. \u041d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c, \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f, \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0430. \u0421\u043c\u043e\u0442\u0440\u0438\u0442\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/230877\/#scripting-in-import\">\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u0438\u043c\u043f\u043e\u0440\u0442\u0435<\/a>.<\/p>\n<h4>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/h4>\n<p>  <b>\u0418\u043c\u043f\u043e\u0440\u0442 \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.<\/b> \u0421\u043a\u0440\u0438\u043f\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u043d\u043e \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. \u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 <code>&lt;head&gt;<\/code> \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0418\u043c\u0435\u044f \u044d\u0442\u043e \u0432\u0432\u0438\u0434\u0443, \u0432\u0430\u0436\u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b <code>&lt;script&gt;<\/code>:<\/p>\n<pre><code class=\"html\">&lt;head&gt;   &lt;link rel=&quot;import&quot; href=&quot;\/path\/to\/import_that_takes_5secs.html&quot;&gt;   &lt;script&gt;console.log('I block page rendering');&lt;\/script&gt; &lt;\/head&gt; <\/code><\/pre>\n<p>  \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<h5>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 #1 (\u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 <code>&lt;head&gt;<\/code> \u0438\u043b\u0438 \u043f\u043e \u0445\u043e\u0434\u0443 \u0442\u0435\u043b\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430<\/h5>\n<p>  \u042f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0438\u0436\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0430. \u041d\u043e \u0432\u044b \u0432\u0435\u0434\u044c \u0438 \u0442\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0435 \u044d\u0442\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u041d\u0415 \u0422\u0410\u041a \u041b\u0418!? \ud83d\ude09<\/p>\n<p>  \u0432\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"html\">&lt;head&gt;   &lt;link rel=&quot;import&quot; href=&quot;\/path\/to\/import.html&quot;&gt;   &lt;link rel=&quot;import&quot; href=&quot;\/path\/to\/import2.html&quot;&gt;   &lt;!-- avoid including script --&gt; &lt;\/head&gt; &lt;body&gt;   &lt;!-- avoid including script --&gt;    &lt;div id=&quot;container&quot;&gt;&lt;\/div&gt;    &lt;!-- avoid including script --&gt;   ...    &lt;script&gt;     \/\/ Other scripts n' stuff.      \/\/ Bring in the import content.     var link = document.querySelector('link[rel=&quot;import&quot;]');     var post = link.import.querySelector('#blog-post');      var container = document.querySelector('#container');     container.appendChild(post.cloneNode(true));   &lt;\/script&gt; &lt;\/body&gt; <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0441\u043d\u0438\u0437\u0443.<\/p>\n<h5>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 1.5: \u0438\u043c\u043f\u043e\u0440\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e<code>&lt;body&gt;<\/code><\/h5>\n<p>  \u0414\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442\u044c \u0438\u043c\u043f\u043e\u0440\u0442\u0443 <a href=\"http:\/\/habrahabr.ru\/post\/230877\/#scripting-in-import\">\u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u0435\u0431\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c<\/a>. \u0415\u0441\u043b\u0438 \u0430\u0432\u0442\u043e\u0440 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435, \u0442\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u0430\u043c \u0441\u0435\u0431\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u0432 \u043e\u0433\u043e\u0432\u043e\u0440\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445:<\/p>\n<p>  import.html:  <\/p>\n<pre><code class=\"html\">&lt;div id=&quot;blog-post&quot;&gt;...&lt;\/div&gt; &lt;script&gt;   var me = document.currentScript.ownerDocument;   var post = me.querySelector('#blog-post');    var container = document.querySelector('#container');   container.appendChild(post.cloneNode(true)); &lt;\/script&gt; <\/code><\/pre>\n<p>  index.html  <\/p>\n<pre><code class=\"html\">&lt;head&gt;   &lt;link rel=&quot;import&quot; href=&quot;\/path\/to\/import.html&quot;&gt; &lt;\/head&gt; &lt;body&gt;   &lt;!-- no need for script. the import takes care of things --&gt; &lt;\/body&gt; <\/code><\/pre>\n<p>  <\/p>\n<h5>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 #2: \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 <code>&lt;head&gt;<\/code> \u0438\u043b\u0438 \u043f\u043e \u0445\u043e\u0434\u0443 \u0442\u0435\u043b\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430<\/h5>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438\u043c\u043f\u043e\u0440\u0442, \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430 \u043d\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. Google Analytics \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 <code>&lt;head&gt;<\/code>. \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 <code>&lt;head&gt;<\/code>, \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u0433\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0443:<\/p>\n<pre><code class=\"html\">&lt;head&gt;   &lt;script&gt;     function addImportLink(url) {       var link = document.createElement('link');       link.rel = 'import';       link.href = url;       link.onload = function(e) {         var post = this.import.querySelector('#blog-post');          var container = document.querySelector('#container');         container.appendChild(post.cloneNode(true));       };       document.head.appendChild(link);     }      addImportLink('\/path\/to\/import.html'); \/\/ Import is added early :)   &lt;\/script&gt;   &lt;script&gt;     \/\/ other scripts   &lt;\/script&gt; &lt;\/head&gt; &lt;body&gt;    &lt;div id=&quot;container&quot;&gt;&lt;\/div&gt;    ... &lt;\/body&gt; <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u0438\u043c\u043f\u043e\u0440\u0442 \u0432 \u043a\u043e\u043d\u0446\u0435 <code>&lt;body&gt;<\/code>.<\/p>\n<pre><code class=\"html\">&lt;head&gt;   &lt;script&gt;     \/\/ other scripts   &lt;\/script&gt; &lt;\/head&gt; &lt;body&gt;   &lt;div id=&quot;container&quot;&gt;&lt;\/div&gt;   ...    &lt;script&gt;     function addImportLink(url) { ... }      addImportLink('\/path\/to\/import.html'); \/\/ Import is added very late :(   &lt;\/script&gt; &lt;\/body&gt; <\/code><\/pre>\n<p>  <i><b>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/b>: \u0421\u0430\u043c\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u043d\u0430\u0438\u043c\u0435\u043d\u0435\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u0435\u043d. \u041f\u0430\u0440\u0441\u0435\u0440 \u043d\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/i><\/p>\n<h3>\u0427\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c<\/h3>\n<p>  <\/p>\n<ul>\n<li> mime-\u0442\u0438\u043f \u0438\u043c\u043f\u043e\u0440\u0442\u0430, \u044d\u0442\u043e <code>text\/html<\/code><\/li>\n<li> \u0420\u0435\u0441\u0443\u0440\u0441\u044b \u0441 \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432(CORS)<\/li>\n<li> \u0418\u043c\u043f\u043e\u0440\u0442 \u0441 \u043e\u0434\u043d\u0438\u043c URL \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \u042d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437.<\/li>\n<li> \u0421\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u0438\u043c\u043f\u043e\u0440\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u043d\u043e \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.<\/li>\n<li> \u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443 &quot;#\u0434\u043e\u0431\u0430\u0432\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0440\u044f\u043c\u043e \u0441\u044e\u0434\u0430&quot;. \u041e\u043d \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u00ab\u043f\u043e\u0439\u0434\u0438 \u0438 \u0432\u043e\u0437\u044c\u043c\u0438 \u044d\u0442\u043e\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0447\u0442\u043e\u0431\u044b \u044f \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u043e\u0433 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00bb. \u0421\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u0438\u043c\u043f\u043e\u0440\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0430 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430, \u0441\u0442\u0438\u043b\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u044f\u0432\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. <i>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/i> \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b <code>&lt;style&gt;<\/code> \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u042d\u0442\u043e \u0432\u0441\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u0443\u044e \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 HTML-\u0438\u043c\u043f\u043e\u0440\u0442\u043e\u043c \u0438 <code>&lt;iframe&gt;<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443 \u00ab\u0437\u0430\u0433\u0440\u0443\u0437\u0438 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043f\u0440\u044f\u043c\u043e \u0437\u0434\u0435\u0441\u044c\u00bb.<\/li>\n<\/ul>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>  HTML-\u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u0431\u043e\u0440 HTML\/CSS\/JS \u043a\u043e\u0434\u0430, \u043a\u0430\u043a \u0435\u0434\u0438\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043a\u0430\u043a \u0441\u0430\u043c\u043e \u043f\u043e \u0441\u0435\u0431\u0435, \u0442\u0430\u043a \u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0432\u0435\u0431-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0434\u043b\u044f \u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>&lt;link rel=&quot;import&quot;&gt;<\/code>.<\/p>\n<p>  HTML-\u0438\u043c\u043f\u043e\u0440\u0442 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438\u0434\u0435\u044f, \u043d\u043e \u043e\u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<h4>\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>  <\/p>\n<ul>\n<li> <b>\u0420\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435<\/b> \u043d\u0430\u0431\u043e\u0440\u043e\u0432 <a href=\"http:\/\/habrahabr.ru\/post\/230877\/#bundling\">\u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e HTML\/CSS\/JS \u043a\u043e\u0434\u0430 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u043a\u0435<\/a>. \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u0440\u0443\u0433 \u0432 \u0434\u0440\u0443\u0433\u0430.<\/li>\n<li> <b>\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430<\/b> \u2014 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u0434\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u0430.<\/li>\n<li> <b>\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <a href=\"http:\/\/www.html5rocks.com\/tutorials\/webcomponents\/customelements\/\">\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432<\/a>.<\/b> \u0418\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 <a href=\"http:\/\/www.html5rocks.com\/tutorials\/webcomponents\/customelements\/#registering\">\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438<\/a> \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u042d\u0442\u043e, \u043f\u043e \u0441\u0443\u0442\u0438, \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043e\u0442 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/li>\n<li> <b><a href=\"#dependecies\">\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438<\/a><\/b> \u2014 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.<\/li>\n<li> <b>\u0420\u0430\u0437\u0431\u0438\u0442\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b<\/b> \u2014 \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 JS \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u0435\u0441\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0431\u044b\u043b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d, \u0447\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u043f\u043b\u043e\u0445\u043e \u0434\u043b\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0421 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441\u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043f\u043e \u0445\u043e\u0434\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438!<br \/>  <code>&lt;link rel=&quot;import&quot; href=&quot;chunks.html&quot;&gt;<\/code>:\n<pre><code class=\"html\">&lt;script&gt;\/* script chunk A goes here *\/&lt;\/script&gt; &lt;script&gt;\/* script chunk B goes here *\/&lt;\/script&gt; &lt;script&gt;\/* script chunk C goes here *\/&lt;\/script&gt; ... <\/code><\/pre>\n<p>  <\/li>\n<li> <b>\u0420\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 HTML-\u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438<\/b> \u2014 \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e HTML-\u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e.<\/li>\n<li> <b>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0440\u0435\u0436\u0438\u043c\u0430\u043c\u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0438 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d\u0430<\/b> \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0438\u043c\u043f\u043e\u0440\u0442 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f. \u042d\u0442\u043e \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u043c \u0438\u043b\u0438 \u0434\u0440\u0435\u0432\u043e\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0430.<\/li>\n<\/ul>\n<p>  <a name=\"first-annotation\"><\/a><br \/>  <i><sup>1<\/sup>. \u0412 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0432\u0443\u0447\u0438\u0442 \u0442\u0430\u043a \u00abYo dawg. I hear you like imports, so I included an import in your import.\u00bb, \u044d\u0442\u043e \u043e\u0442\u0441\u044b\u043b\u043a\u0430 \u043a <a href=\"http:\/\/lurkmore.to\/Yo_dawg\">\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c\u0443 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044e<\/a> \u0440\u0435\u043f\u0435\u0440\u0430 Xzibit<\/i>   \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\/231845\/\"> http:\/\/habrahabr.ru\/post\/231845\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       \u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u00ab<a href=\"http:\/\/html5rocks.com\/en\/tutorials\/webcomponents\/imports\/#deliver-webcomponents\">HTML Imports #include for the web<\/a>\u00bb, Eric Bidelman.<\/p>\n<p>  <a href=\"http:\/\/habrahabr.ru\/post\/230877\/\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430.<\/a><\/p>\n<h3>\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0431-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/h3>\n<p>  HTML-\u0438\u043c\u043f\u043e\u0440\u0442 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0435\u0431-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u042d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u044b\u0445 <a href=\"http:\/\/www.html5rocks.com\/webcomponents\/template\/\">HTML <code>&lt;template&gt;<\/code><\/a>, \u0442\u0430\u043a \u0438 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0445 <a href=\"http:\/\/www.html5rocks.com\/tutorials\/webcomponents\/customelements\/#registering\">\u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432<\/a> \u0441 \u0442\u0435\u043d\u0435\u0432\u044b\u043c DOM [<a href=\"http:\/\/www.html5rocks.com\/tutorials\/webcomponents\/shadowdom\/\">1<\/a>, <a href=\"http:\/\/www.html5rocks.com\/tutorials\/webcomponents\/shadowdom-201\/\">2<\/a>, <a href=\"http:\/\/www.html5rocks.com\/tutorials\/webcomponents\/shadowdom-301\/\">3<\/a>]. \u041a\u043e\u0433\u0434\u0430 \u044d\u0442\u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432\u043c\u0435\u0441\u0442\u0435, \u0438\u043c\u043f\u043e\u0440\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f <a href=\"http:\/\/en.cppreference.com\/w\/cpp\/preprocessor\/include\">\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/a> \u0432\u0435\u0431-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.  <\/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-231845","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/231845","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=231845"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/231845\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=231845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=231845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=231845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}