blob: b67e9752edf8dd1dcf6698ac3f3c41d9a83a1fc6 [file] [log] [blame]
// Copyright 2018 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.
/**
* Notify the application to start collecting console logs.
*/
function startLogging() {
chrome.send('setLoggingEnabled', [true]);
$('start-logging').hidden = true;
$('stop-logging').hidden = false;
}
/**
* Notify the application to stop collecting console logs.
*/
function stopLogging() {
chrome.send('setLoggingEnabled', [false]);
$('logs').innerHTML = '';
$('start-logging').hidden = false;
$('stop-logging').hidden = true;
}
document.addEventListener('DOMContentLoaded', function() {
$('start-logging').onclick = startLogging;
$('stop-logging').onclick = stopLogging;
});