| <!DOCTYPE html> |
| <!-- |
| Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. |
| --> |
| <link rel="import" href="/core/analysis/util.html"> |
| |
| <script> |
| 'use strict'; |
| tv.exportTo('tv.c.analysis', function() { |
| function createTimeStamp(timestamp) { |
| if (timestamp === undefined) |
| return ''; |
| var span = document.createElement('tv-c-a-time-stamp'); |
| span.timestamp = timestamp; |
| return span; |
| } |
| return { |
| createTimeStamp: createTimeStamp |
| }; |
| }); |
| </script> |
| |
| <polymer-element name="tv-c-a-time-stamp"> |
| <template> |
| </template> |
| <script> |
| 'use strict'; |
| |
| Polymer({ |
| ready: function() { |
| this.timestamp_ = undefined; |
| }, |
| |
| get timestamp() { |
| return this.timestamp_; |
| }, |
| |
| set timestamp(timestamp) { |
| this.timestamp_ = timestamp; |
| this.shadowRoot.textContent = tv.c.analysis.tsString(timestamp); |
| } |
| }); |
| </script> |
| </polymer-element> |