1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-02-24 15:12:51 +01:00

fix clear.console error. fixes #118

This commit is contained in:
Kushagra Gour 2017-05-21 23:14:38 +05:30
parent 18eebe51d8
commit ba14e66116
2 changed files with 6 additions and 1 deletions

View File

@ -50,6 +50,10 @@
} }
function clear() { function clear() {
if (_options.noUi) {
window.parent.clearConsole();
return;
}
logEl.innerHTML = ''; logEl.innerHTML = '';
} }

View File

@ -1320,7 +1320,8 @@ runBtn, searchInput, consoleEl, consoleLogEl, logCountEl
consoleEl.classList.toggle('is-minimized'); consoleEl.classList.toggle('is-minimized');
trackEvent('ui', 'consoleToggle'); trackEvent('ui', 'consoleToggle');
}; };
scope.clearConsole = function () { // `clearConsole` is on window because it gets called from inside iframe also.
scope.clearConsole = window.clearConsole = function () {
scope.consoleCm.setValue(''); scope.consoleCm.setValue('');
logCount = 0; logCount = 0;
logCountEl.textContent = logCount; logCountEl.textContent = logCount;