OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 * Handles DumpDatabase tab for syncfs-internals. | 6 * Handles DumpDatabase tab for syncfs-internals. |
7 */ | 7 */ |
8 var DumpDatabase = (function() { | 8 var DumpDatabase = (function() { |
9 'use strict'; | 9 'use strict'; |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 var div = document.createElement('div'); | 71 var div = document.createElement('div'); |
72 var table = document.createElement('table'); | 72 var table = document.createElement('table'); |
73 var header = document.createElement('thead'); | 73 var header = document.createElement('thead'); |
74 var body = document.createElement('tbody'); | 74 var body = document.createElement('tbody'); |
75 createDatabaseDumpTable(div, header, body, databaseDump[i]); | 75 createDatabaseDumpTable(div, header, body, databaseDump[i]); |
76 table.appendChild(header); | 76 table.appendChild(header); |
77 table.appendChild(body); | 77 table.appendChild(body); |
78 div.appendChild(table); | 78 div.appendChild(table); |
79 placeholder.appendChild(div); | 79 placeholder.appendChild(div); |
80 } | 80 } |
81 } | 81 }; |
82 | 82 |
83 function main() { | 83 function main() { |
84 getDatabaseDump(); | 84 getDatabaseDump(); |
85 $('refresh-database-dump').addEventListener('click', getDatabaseDump); | 85 $('refresh-database-dump').addEventListener('click', getDatabaseDump); |
86 } | 86 } |
87 | 87 |
88 document.addEventListener('DOMContentLoaded', main); | 88 document.addEventListener('DOMContentLoaded', main); |
89 return DumpDatabase; | 89 return DumpDatabase; |
90 })(); | 90 })(); |
OLD | NEW |