blob: b4bc5bdd9696c3ffee793c07d31681cbea6b26fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* iron-meta.html
*/
/// <reference path="../polymer/types/polymer.d.ts" />
/// <reference path="iron-meta-extra.d.ts" />
/**
* `iron-meta` is a generic element you can use for sharing information across the DOM tree.
* It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) such that any
* instance of iron-meta has access to the shared
* information. You can use `iron-meta` to share whatever you want (or create an extension
* [like x-meta] for enhancements).
*
* The `iron-meta` instances containing your actual data can be loaded in an import,
* or constructed in any way you see fit. The only requirement is that you create them
* before you try to access them.
*
* Examples:
*
* If I create an instance like this:
*
* <iron-meta key="info" value="foo/bar"></iron-meta>
*
* Note that value="foo/bar" is the metadata I've defined. I could define more
* attributes or use child nodes to define additional metadata.
*
* Now I can access that element (and it's metadata) from any iron-meta instance
* via the byKey method, e.g.
*
* meta.byKey('info');
*
* Pure imperative form would be like:
*
* document.createElement('iron-meta').byKey('info');
*
* Or, in a Polymer element, you can include a meta in your template:
*
* <iron-meta id="meta"></iron-meta>
* ...
* this.$.meta.byKey('info');
*/
interface IronMetaElement extends Polymer.Element {
/**
* The type of meta-data. All meta-data of the same type is stored
* together.
*/
type: string;
/**
* The key used to store `value` under the `type` namespace.
*/
key: string|null;
/**
* The meta-data to store or retrieve.
*/
value: any;
/**
* If true, `value` is set to the iron-meta instance itself.
*/
self: boolean|null|undefined;
hostAttributes: object|null;
readonly list: any;
_selfChanged(self: any): void;
/**
* Retrieves meta data value by key.
*
* @param key The key of the meta-data to be returned.
*/
byKey(key: string): any;
}
interface HTMLElementTagNameMap {
"iron-meta": IronMetaElement;
}
|