| 102 | }, |
| 103 | |
| 104 | async chromeStorageOnChanged(_changes, area) { |
| 105 | // We store data with keys [settings-v1, ...] into the local storage. Only broadcast an event if |
| 106 | // the object stored with the settings key has changed. |
| 107 | // We only store settings in the sync area, so storage.sync changes must be settings changes. |
| 108 | if (area == "sync") { |
| 109 | await this.load(); |
| 110 | this.dispatchEvent("change"); |
| 111 | } |
| 112 | }, |
| 113 | |
| 114 | async load() { |
| 115 | // NOTE(philc): If we change the schema of the settings object in a backwards-incompatible way, |