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

Unified Diff: third_party/polymer/v1_0/components/iron-localstorage/iron-localstorage.html

Issue 1187823002: Update Polymer components and re-run reproduce.sh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 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: third_party/polymer/v1_0/components/iron-localstorage/iron-localstorage.html
diff --git a/third_party/polymer/v1_0/components/iron-localstorage/iron-localstorage.html b/third_party/polymer/v1_0/components/iron-localstorage/iron-localstorage.html
index 986cbcd6d73342c2f4958b3afc1ddfa947ed2751..46a094eca388d4cd98f33e77835c03a11bfc20f5 100644
--- a/third_party/polymer/v1_0/components/iron-localstorage/iron-localstorage.html
+++ b/third_party/polymer/v1_0/components/iron-localstorage/iron-localstorage.html
@@ -13,7 +13,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<!--
Element access to Web Storage API (window.localStorage).
-Keeps `value` is sync with a localStorage key.
+Keeps `value` in sync with a localStorage key.
Direct assignments to `value` are automatically detected and saved.
Subproperty assignments are not (ex: `value.bar='foo'`).
@@ -46,9 +46,9 @@ No `<iron-localstorage value="{{foo.bar}}"`.
/**
* Fired when value loads from localStorage.
*
- * @param {Object} detail
- * @param {Boolean} detail.externalChange true if change occured in different window
- * @event iron-localstorage-load
+ * @event paper-responsive-change
+ * @param {{externalChange: boolean}} detail -
+ * externalChange: True if change occured in different window.
*/
/**
@@ -68,6 +68,7 @@ No `<iron-localstorage value="{{foo.bar}}"`.
/**
* The data associated with this storage.
* If value is set to null, and storage is in useRaw mode, item will be deleted
+ * @type {*}
*/
value: {
type: Object,
@@ -149,10 +150,10 @@ No `<iron-localstorage value="{{foo.bar}}"`.
/**
* loads value from local storage
- * @param {Boolean} externalChange true if loading changes from a different window
+ * @param {boolean=} externalChange true if loading changes from a different window
*/
_load: function(externalChange) {
- var v = localStorage.getItem(this.name);
+ var v = window.localStorage.getItem(this.name);
if (v === null) {
this.fire('iron-localstorage-load-empty');
@@ -179,9 +180,9 @@ No `<iron-localstorage value="{{foo.bar}}"`.
var v = this.useRaw ? this.value : JSON.stringify(this.value);
try {
if (this.value === null) {
- localStorage.removeItem(this.name);
+ window.localStorage.removeItem(this.name);
} else {
- localStorage.setItem(this.name, v);
+ window.localStorage.setItem(this.name, /** @type {string} */ (v));
}
}
catch(ex) {

Powered by Google App Engine
This is Rietveld 408576698