Skip to content

Instantly share code, notes, and snippets.

@a-m-dev
Created August 6, 2019 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a-m-dev/58fbc83be0d6924f245bd960d1e22d08 to your computer and use it in GitHub Desktop.
Save a-m-dev/58fbc83be0d6924f245bd960d1e22d08 to your computer and use it in GitHub Desktop.
showResult = (result) => {
let node = document.createElement('DIV');
node.classList.add('custom-alert');
let textnode = document.createTextNode(result);
node.appendChild(textnode);
node.style.overflow = 'scroll';
node.style.position = 'fixed';
node.style.height = '5%';
node.style.width = '100%';
node.style.zIndex = '1000011111111';
node.style.backgroundColor = 'wheat';
node.style.wordBreak = 'break-all';
node.style.padding = '20px';
node.style.whiteSpace = 'pre-wrap';
document.getElementById('app').appendChild(node);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment