OLD | NEW |
| (Empty) |
1 # HTML Imports polyfill | |
2 | |
3 [HTML Imports][1] are a way to include and reuse HTML documents in other HTML | |
4 documents. As `<script>` tags let authors include external Javascript in their | |
5 pages, imports let authors load full HTML resources. In particular, imports let | |
6 authors include [Custom Element](https://github.com/Polymer/CustomElements) | |
7 definitions from external URLs. | |
8 | |
9 | |
10 ## Getting started | |
11 | |
12 Include the `html_import.debug.js` or `html_import.min.js` (minified) file in | |
13 your project. | |
14 | |
15 <script src="packages/html_import/html_import.debug.js"></script> | |
16 | |
17 `html_import.debug.js` is the debug loader and uses `document.write` to load | |
18 additional modules. | |
19 | |
20 Use the minified version (`html_import.min.js`) if you need to load the file | |
21 dynamically. | |
22 | |
23 ## Basic usage | |
24 | |
25 For HTML imports use the `import` relation on a standard `<link>` tag, for | |
26 example: | |
27 | |
28 <link rel="import" href="import-file.html"> | |
29 | |
30 ## Polyfill details | |
31 | |
32 You can read more about how the polyfill is implemented in JavaScript here: | |
33 <https://github.com/Polymer/HTMLImports/tree/master#polyfill-details> | |
34 | |
35 ## Getting the source code | |
36 | |
37 This package is built from: | |
38 <https://github.com/Polymer/HTMLImports/tree/master> | |
39 | |
40 You'll need [node.js](http://nodejs.org) to rebuild the JS file. Use | |
41 `npm install` to get dependencies and `grunt` to build. | |
42 | |
43 [1]: https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/imports/index.html | |
OLD | NEW |