Index: lib/src/iron-meta/iron-meta.html |
diff --git a/lib/src/iron-meta/iron-meta.html b/lib/src/iron-meta/iron-meta.html |
index 4b3431182823c53da1630bbc5ff79ab2c5a9a49d..0d3a06e0f470f537f90839553014221390b72b0d 100644 |
--- a/lib/src/iron-meta/iron-meta.html |
+++ b/lib/src/iron-meta/iron-meta.html |
@@ -58,6 +58,7 @@ Or, in a Polymer element, you can include a meta in your template: |
// monostate data |
var metaDatas = {}; |
var metaArrays = {}; |
+ var singleton = null; |
Polymer.IronMeta = Polymer({ |
@@ -110,6 +111,10 @@ Or, in a Polymer element, you can include a meta in your template: |
}, |
+ hostAttributes: { |
+ hidden: true |
+ }, |
+ |
/** |
* Only runs if someone invokes the factory/constructor directly |
* e.g. `new Polymer.IronMeta()` |
@@ -204,6 +209,13 @@ Or, in a Polymer element, you can include a meta in your template: |
}); |
+ Polymer.IronMeta.getIronMeta = function getIronMeta() { |
+ if (singleton === null) { |
+ singleton = new Polymer.IronMeta(); |
+ } |
+ return singleton; |
+ }; |
+ |
/** |
`iron-meta-query` can be used to access infomation stored in `iron-meta`. |