Skip to content

Instantly share code, notes, and snippets.

@marcelowa
Last active January 13, 2022 08:20
Show Gist options
  • Save marcelowa/d3b9088d9d47398bac921ac174d8255b to your computer and use it in GitHub Desktop.
Save marcelowa/d3b9088d9d47398bac921ac174d8255b to your computer and use it in GitHub Desktop.
html console
console.log('hello!!!')
window.dividePromise = () => ({then: () => {}});
window.divideCallback = () => {};
const origConsoleLog = console.log;
const origConsoleError = console.error;
window.console.log = (input) => {
origConsoleLog(input);
document.write('<div>Result: '+ input + "</div>");
};
window.console.error = (input) => {
origConsoleError('<div>Error: '+ input + "</div>");
document.write(input);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment