| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 Polymer({ | 5 Polymer({ |
| 6 is: 'history-router', | 6 is: 'history-router', |
| 7 | 7 |
| 8 properties: { | 8 properties: { |
| 9 selectedPage: { | 9 selectedPage: |
| 10 type: String, | 10 {type: String, notify: true, observer: 'selectedPageChanged_'}, |
| 11 notify: true, | |
| 12 observer: 'selectedPageChanged_' | |
| 13 }, | |
| 14 | 11 |
| 15 /** @type {QueryState} */ | 12 /** @type {QueryState} */ |
| 16 queryState: Object, | 13 queryState: Object, |
| 17 | 14 |
| 18 path_: String, | 15 path_: String, |
| 19 | 16 |
| 20 queryParams_: Object, | 17 queryParams_: Object, |
| 21 }, | 18 }, |
| 22 | 19 |
| 23 /** @private {boolean} */ | 20 /** @private {boolean} */ |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 }, | 75 }, |
| 79 | 76 |
| 80 /** @private */ | 77 /** @private */ |
| 81 onUrlChanged_: function() { | 78 onUrlChanged_: function() { |
| 82 // Changing the url and query parameters at the same time will cause two | 79 // Changing the url and query parameters at the same time will cause two |
| 83 // calls to onUrlChanged_. Debounce the actual work so that these two | 80 // calls to onUrlChanged_. Debounce the actual work so that these two |
| 84 // changes get processed together. | 81 // changes get processed together. |
| 85 this.debounce('parseUrl', this.parseUrl_.bind(this)); | 82 this.debounce('parseUrl', this.parseUrl_.bind(this)); |
| 86 }, | 83 }, |
| 87 }); | 84 }); |
| OLD | NEW |