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

Unified Diff: polymer_1.2.3/bower_components/iron-meta/iron-meta.html

Issue 1581713003: [third_party] add polymer 1.2.3 (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: 1.2.3 Created 4 years, 11 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
Index: polymer_1.2.3/bower_components/iron-meta/iron-meta.html
diff --git a/polymer_1.0.4/bower_components/iron-meta/iron-meta.html b/polymer_1.2.3/bower_components/iron-meta/iron-meta.html
similarity index 94%
copy from polymer_1.0.4/bower_components/iron-meta/iron-meta.html
copy to polymer_1.2.3/bower_components/iron-meta/iron-meta.html
index 4b3431182823c53da1630bbc5ff79ab2c5a9a49d..1521be5c0eab27d3266e49d69f048cbda1d19e07 100644
--- a/polymer_1.0.4/bower_components/iron-meta/iron-meta.html
+++ b/polymer_1.2.3/bower_components/iron-meta/iron-meta.html
@@ -33,7 +33,7 @@ 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').getAttribute('value').
+ meta.byKey('info').getAttribute('value');
Pure imperative form would be like:
@@ -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,9 +111,15 @@ 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()`
+ *
+ * @param {{type: (string|undefined), key: (string|undefined), value}=} config
*/
factoryImpl: function(config) {
if (config) {
@@ -204,6 +211,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`.
@@ -270,6 +284,8 @@ Or, in a Polymer element, you can include a meta in your template:
/**
* Actually a factory method, not a true constructor. Only runs if
* someone invokes it directly (via `new Polymer.IronMeta()`);
+ *
+ * @param {{type: (string|undefined), key: (string|undefined)}=} config
*/
factoryImpl: function(config) {
if (config) {
« no previous file with comments | « polymer_1.2.3/bower_components/iron-meta/index.html ('k') | polymer_1.2.3/bower_components/iron-meta/test/basic.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698