OLD | NEW |
| (Empty) |
1 <!doctype html> | |
2 | |
3 <!-- | |
4 Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | |
5 for details. All rights reserved. Use of this source code is governed by a | |
6 BSD-style license that can be found in the LICENSE file. | |
7 --> | |
8 | |
9 <html lang="en"> | |
10 <head> | |
11 <meta charset="utf-8"> | |
12 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
13 | |
14 <script type="application/javascript"> | |
15 | |
16 // TODO(efortuna): Revisit in a bit -- should we use | |
17 // performance.timing.navigationStart? | |
18 // navigationStart may be a bit noisy. Re-evaluate after we have more | |
19 // data. Note: performance.timing.domLoading would be nice, but | |
20 // performance.timing seems to be null on Safari 7.0.2. (Issue 17923) | |
21 var startTime = new Date().getTime(); | |
22 function onReceive(e) { | |
23 // Listen for a timestamp signifying when app startup is complete. | |
24 var endTime = e.data; | |
25 var startupTime = endTime - startTime; | |
26 document.body.innerHTML = 'The startup time is ' + startupTime + | |
27 ' milliseconds.'; | |
28 reportPerformanceTestDone(); | |
29 } | |
30 window.addEventListener('message', onReceive, true); | |
31 </script> | |
32 | |
33 <script src="packages/browser_controller/perf_test_controller.js"></script> | |
34 <title> TodoMVC • Startup Performance </title> | |
35 <link rel="stylesheet" href="app/app.css"> | |
36 <link rel="import" href="packages/polymer/polymer.html"> | |
37 <link rel="import" href="lib-elements/polymer_localstorage.html"> | |
38 <link rel="import" href="elements/td_model.html"> | |
39 <link rel="import" href="elements/td_todos.html"> | |
40 </head> | |
41 <body> | |
42 <header> | |
43 <h1>todos</h1> | |
44 </header> | |
45 <polymer-localstorage id="storage" name="todos-polymer"> | |
46 </polymer-localstorage> | |
47 <td-model id="model" storageId="storage"></td-model> | |
48 <td-todos modelId="model"></td-todos> | |
49 <script type="application/dart" src="performance.dart"></script> | |
50 <footer id="info"> | |
51 <p>Double-click to edit a todo</p> | |
52 <p>Created by <a href="https://www.dartlang.org/polymer-dart/"> | |
53 The Polymer.dart Authors</a></p> | |
54 <p>This example was built using a pre-alpha version of Polymer.dart.</p> | |
55 <p>Part of <a href="http://todomvc.com">TodoMVC</a></p> | |
56 </footer> | |
57 </body> | |
58 </html> | |
OLD | NEW |