blob: 2b5a40457c08c86634a80b6a38d0ba9abf2c3bc2 [file] [log] [blame]
Chris Craikf516a622015-04-01 17:52:39 -07001<!DOCTYPE html>
2<!--
3Copyright (c) 2015 The Chromium Authors. All rights reserved.
4Use of this source code is governed by a BSD-style license that can be
5found in the LICENSE file.
6-->
7<link rel="import" href="/core/analysis/util.html">
8
9<script>
10'use strict';
11tv.exportTo('tv.c.analysis', function() {
12 function createTimeStamp(timestamp) {
13 if (timestamp === undefined)
14 return '';
15 var span = document.createElement('tv-c-a-time-stamp');
16 span.timestamp = timestamp;
17 return span;
18 }
19 return {
20 createTimeStamp: createTimeStamp
21 };
22});
23</script>
24
25<polymer-element name="tv-c-a-time-stamp">
26 <template>
27 </template>
28 <script>
29 'use strict';
30
31 Polymer({
32 ready: function() {
33 this.timestamp_ = undefined;
34 },
35
36 get timestamp() {
37 return this.timestamp_;
38 },
39
40 set timestamp(timestamp) {
41 this.timestamp_ = timestamp;
42 this.shadowRoot.textContent = tv.c.analysis.tsString(timestamp);
43 }
44 });
45 </script>
Chris Craik44c28202015-05-12 17:25:16 -070046</polymer-element>