OLD | NEW |
1 <!-- | 1 <!-- |
| 2 @license |
2 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
3 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
4 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
5 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
6 Code distributed by Google as part of the polymer project is also | 7 Code distributed by Google as part of the polymer project is also |
7 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
8 --><!-- | 9 --><html><head><link rel="import" href="../polymer/polymer.html"> |
| 10 |
| 11 <!-- |
9 `iron-meta` is a generic element you can use for sharing information across the
DOM tree. | 12 `iron-meta` is a generic element you can use for sharing information across the
DOM tree. |
10 It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) such that a
ny | 13 It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) such that a
ny |
11 instance of iron-meta has access to the shared | 14 instance of iron-meta has access to the shared |
12 information. You can use `iron-meta` to share whatever you want (or create an ex
tension | 15 information. You can use `iron-meta` to share whatever you want (or create an ex
tension |
13 [like x-meta] for enhancements). | 16 [like x-meta] for enhancements). |
14 | 17 |
15 The `iron-meta` instances containing your actual data can be loaded in an import
, | 18 The `iron-meta` instances containing your actual data can be loaded in an import
, |
16 or constructed in any way you see fit. The only requirement is that you create t
hem | 19 or constructed in any way you see fit. The only requirement is that you create t
hem |
17 before you try to access them. | 20 before you try to access them. |
18 | 21 |
(...skipping 14 matching lines...) Expand all Loading... |
33 Pure imperative form would be like: | 36 Pure imperative form would be like: |
34 | 37 |
35 document.createElement('iron-meta').byKey('info').getAttribute('keyUrl'); | 38 document.createElement('iron-meta').byKey('info').getAttribute('keyUrl'); |
36 | 39 |
37 Or, in a Polymer element, you can include a meta in your template: | 40 Or, in a Polymer element, you can include a meta in your template: |
38 | 41 |
39 <iron-meta id="meta"></iron-meta> | 42 <iron-meta id="meta"></iron-meta> |
40 ... | 43 ... |
41 this.$.meta.byKey('info').getAttribute('keyUrl'); | 44 this.$.meta.byKey('info').getAttribute('keyUrl'); |
42 | 45 |
43 @group Polymer Iron Elements | 46 @group Iron Elements |
| 47 @demo demo/index.html |
| 48 @hero hero.svg |
44 @element iron-meta | 49 @element iron-meta |
45 --><html><head><link rel="import" href="../polymer/polymer.html"> | 50 --> |
46 | 51 |
47 </head><body><script src="iron-meta-extracted.js"></script></body></html> | 52 </head><body><script src="iron-meta-extracted.js"></script></body></html> |
OLD | NEW |