Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(982)

Unified Diff: lib/src/iron-meta/iron-meta.html

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/iron-media-query/test/basic.html ('k') | lib/src/iron-meta/test/iron-meta.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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`.
« no previous file with comments | « lib/src/iron-media-query/test/basic.html ('k') | lib/src/iron-meta/test/iron-meta.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698