| OLD | NEW |
| 1 <!-- Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 <!-- Copyright (c) 2014 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 <!-- | 5 <!-- |
| 6 Use to observe to dynamically observe changes to the hash in the url. | 6 Use to observe to dynamically observe changes to the hash in the url. |
| 7 | 7 |
| 8 ex. | 8 ex. |
| 9 <cr-hash-observer on-hash-changed="{{ handleHashChange }}"></cr-hash-obs
erver> | 9 <cr-hash-observer on-hash-changed="{{ handleHashChange }}"></cr-hash-obs
erver> |
| 10 --> | 10 --> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 function handleHashChange() { | 42 function handleHashChange() { |
| 43 setTimeout(notifyInstancesIfNeeded); | 43 setTimeout(notifyInstancesIfNeeded); |
| 44 } | 44 } |
| 45 | 45 |
| 46 document.addEventListener("navigate", handleHashChange); | 46 document.addEventListener("navigate", handleHashChange); |
| 47 window.addEventListener("hashchange", handleHashChange); | 47 window.addEventListener("hashchange", handleHashChange); |
| 48 })(); | 48 })(); |
| 49 </script> | 49 </script> |
| 50 </polymer-element> | 50 </polymer-element> |
| OLD | NEW |