JSFiddle - React, Tailwind, and code Playground
JavaScript
//open a new window
//"newWindow" is your reference to it
var newWindow = window.open();
//"newWindow.document.body" is the body of the new window
var newWindowBody = newWindow.document.body
//let's test by adding a text node to it
var text = document.createTextNode('foo');
newWindowBody.appendChild(text);