Service workers: Allow HTTPS pages arrived at via HTTP redirect to use SW
[chromium-blink-merge.git] / third_party / polymer / v1_0 / components-chromium / iron-meta / iron-meta.html
blobe6e151e8c58d401ce1e6cd62c15c1558101fa98b
1 <!--
2 @license
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9 --><html><head><link rel="import" href="../polymer/polymer.html">
11 <!--
12 `iron-meta` is a generic element you can use for sharing information across the DOM tree.
13 It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) such that any
14 instance of iron-meta has access to the shared
15 information. You can use `iron-meta` to share whatever you want (or create an extension
16 [like x-meta] for enhancements).
18 The `iron-meta` instances containing your actual data can be loaded in an import,
19 or constructed in any way you see fit. The only requirement is that you create them
20 before you try to access them.
22 Examples:
24 If I create an instance like this:
26 <iron-meta key="info" value="foo/bar"></iron-meta>
28 Note that value="foo/bar" is the metadata I've defined. I could define more
29 attributes or use child nodes to define additional metadata.
31 Now I can access that element (and it's metadata) from any iron-meta instance
32 via the byKey method, e.g.
34 meta.byKey('info').getAttribute('value').
36 Pure imperative form would be like:
38 document.createElement('iron-meta').byKey('info').getAttribute('value');
40 Or, in a Polymer element, you can include a meta in your template:
42 <iron-meta id="meta"></iron-meta>
43 ...
44 this.$.meta.byKey('info').getAttribute('value');
46 @group Iron Elements
47 @demo demo/index.html
48 @hero hero.svg
49 @element iron-meta
50 -->
52 </head><body><script src="iron-meta-extracted.js"></script></body></html>