update polymer

This commit is contained in:
Luke Pulverenti 2015-10-27 10:58:38 -04:00
parent 6825ae319e
commit 2d53ff29c5
106 changed files with 3070 additions and 1567 deletions

View file

@ -1,6 +1,6 @@
{
"name": "iron-meta",
"version": "1.0.3",
"version": "1.1.0",
"keywords": [
"web-components",
"polymer"
@ -25,14 +25,14 @@
"web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"homepage": "https://github.com/polymerelements/iron-meta",
"_release": "1.0.3",
"homepage": "https://github.com/PolymerElements/iron-meta",
"_release": "1.1.0",
"_resolution": {
"type": "version",
"tag": "v1.0.3",
"commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04"
"tag": "v1.1.0",
"commit": "be7ccf8df650aef1446a4e23af33f5d4e9f3000f"
},
"_source": "git://github.com/polymerelements/iron-meta.git",
"_source": "git://github.com/PolymerElements/iron-meta.git",
"_target": "^1.0.0",
"_originalSource": "polymerelements/iron-meta"
"_originalSource": "PolymerElements/iron-meta"
}

View file

@ -1,6 +1,6 @@
{
"name": "iron-meta",
"version": "1.0.3",
"version": "1.1.0",
"keywords": [
"web-components",
"polymer"

View file

@ -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`.

View file

@ -179,6 +179,15 @@ suite('<iron-meta>', function () {
expect(registeredValue).to.be.equal(secondValue);
});
});
suite('singleton', function () {
test('only one ironmeta created', function () {
var first = Polymer.IronMeta.getIronMeta();
var second = Polymer.IronMeta.getIronMeta();
expect(first).to.be.equal(second);
});
});
});
</script>