Chromium Code Reviews| Index: pkg/html_import/README.md |
| diff --git a/pkg/html_import/README.md b/pkg/html_import/README.md |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0c595174d1a95c3c70fdbca43423876e63bb89bc |
| --- /dev/null |
| +++ b/pkg/html_import/README.md |
| @@ -0,0 +1,32 @@ |
| +# HTML Imports polyfill |
|
Jennifer Messerly
2013/07/25 19:35:11
link the spec?
https://dvcs.w3.org/hg/webcomponent
Siggi Cherem (dart-lang)
2013/07/25 20:48:40
Done.
|
| + |
| +HTML Imports are a way to include and reuse HTML documents in other HTML documents. As `<script>` tags let authors include external Javascript in their pages, imports let authors load full HTML resources. In particular, imports let authors include [Custom Element](https://github.com/Polymer/CustomElements) definitions from external URLs. |
|
Jennifer Messerly
2013/07/25 19:34:27
long line :)
Siggi Cherem (dart-lang)
2013/07/25 20:48:40
Done. I copied it over from their file =)
|
| + |
| + |
| +## Getting Started |
| + |
| +Include the `html-imports.js` or `html-imports.min.js` (minified) file in your project. |
| + |
| + <script src="packages/html_import/html-imports.js"></script> |
|
Jennifer Messerly
2013/07/25 19:34:27
this should be _?
Siggi Cherem (dart-lang)
2013/07/25 20:48:40
Their file is actually '-', should I rename it?
I
Jennifer Messerly
2013/07/25 20:51:08
yeah, I would rename it to match pkg name. After c
|
| + |
| +`html-imports.js` is the debug loader and uses `document.write` to load additional modules. |
| +Use the minified version (`html-imports.min.js`) if you need to load the file dynamically. |
| + |
| +## Basic usage |
| + |
| +For HTML imports use the `import` relation on a standard `<link>` tag, for example: |
| + |
| + <link rel="import" href="import-file.html"> |
| + |
| +## Polyfill details |
| + |
| +You can read more about how the polyfill is implemented in JavaScript here: |
| +<https://github.com/Polymer/HTMLImports/tree/master#polyfill-details> |
| + |
| +## Getting the source code |
| + |
| +This package is built from: |
| +<https://github.com/Polymer/HTMLImports/tree/master> |
| + |
| +You'll need [node.js](http://nodejs.org) to rebuild the JS file. Use `npm install` to |
| +get dependencies and `grunt` to build. |