Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: remoting/tools/javascript_key_tester/main.js

Issue 910483002: Remove JS summary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer feedback. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 function onLoad() { 6 function onLoad() {
7 var jsLog = document.getElementById('javascript-log');
8 var pnaclLog = document.getElementById('pnacl-log'); 7 var pnaclLog = document.getElementById('pnacl-log');
9 var pnaclPlugin = document.getElementById('pnacl-plugin'); 8 var pnaclPlugin = document.getElementById('pnacl-plugin');
10 var pnaclListener = document.getElementById('pnacl-listener'); 9 var pnaclListener = document.getElementById('pnacl-listener');
11 var textLog = document.getElementById('text-log'); 10 var textLog = document.getElementById('text-log');
12 var textLogContainer = document.getElementById('text-log-container'); 11 var textLogContainer = document.getElementById('text-log-container');
13 12
14 var eventListeners = new EventListeners(jsLog, pnaclLog, textLog, 13 var eventListeners = new EventListeners(pnaclLog, textLog,
15 pnaclPlugin, pnaclListener); 14 pnaclPlugin, pnaclListener);
16 eventListeners.activate(); 15 eventListeners.activate();
17 16
18 document.getElementById('clear-log').addEventListener( 17 document.getElementById('clear-log').addEventListener(
19 'click', 18 'click',
20 function() { 19 function() {
21 jsLog.innerText = '';
22 pnaclLog.innerText = ''; 20 pnaclLog.innerText = '';
23 textLog.innerText = ''; 21 textLog.innerText = '';
24 }, 22 },
25 false); 23 false);
26 document.getElementById('show-log').addEventListener( 24 document.getElementById('show-log').addEventListener(
27 'click', 25 'click',
28 function() { 26 function() {
29 eventListeners.deactivate(); 27 eventListeners.deactivate();
30 textLogContainer.hidden = false; 28 textLogContainer.hidden = false;
31 29
32 var selection = window.getSelection(); 30 var selection = window.getSelection();
33 var range = document.createRange(); 31 var range = document.createRange();
34 range.selectNodeContents(textLog); 32 range.selectNodeContents(textLog);
35 selection.removeAllRanges(); 33 selection.removeAllRanges();
36 selection.addRange(range); 34 selection.addRange(range);
37 }, 35 },
38 false); 36 false);
39 document.getElementById('hide-log').addEventListener( 37 document.getElementById('hide-log').addEventListener(
40 'click', 38 'click',
41 function() { 39 function() {
42 eventListeners.activate(); 40 eventListeners.activate();
43 textLogContainer.hidden = true; 41 textLogContainer.hidden = true;
44 }, 42 },
45 false); 43 false);
46 } 44 }
47 45
48 window.addEventListener('load', onLoad, false); 46 window.addEventListener('load', onLoad, false);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698