JSFiddle - React, Tailwind, and code Playground

JavaScript

var newWindow = window.open();


var html_ticket = '<!doctype html>' +
'<html dir="ltr" lang="en" class="no-js">' +
'<head> ' +
'   <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"></head><body> ' +

'  <h1>hello</h1> ' +

'</body> ' +
'</html> ';

newWindow.document.write(html_ticket);