JSFiddle - React, Tailwind, and code Playground

HTML

<iframe src="https://news.ycombinator.com/" width="500" height="300"></iframe>

JavaScript

var iframe = document.getElementsByTagName('iframe')[0];
var loadHTML = function (data) {
    if (data && data.query && data.query.results && data.query.results.resources && data.query.results.resources.content && data.query.results.resources.status == 200) iframe.src = 'data:text/html,' + encodeURIComponent(data.query.results.resources.content.replace(/<head>/i, '<head><base href="' + iframe.src + '">'));
    else if (data && data.error && data.error.description) iframe.src = 'data:text/html,' + encodeURIComponent(data.error.description);
    else iframe.src = 'data:text/html,' + encodeURIComponent('Error: Cannot load ' + iframe.src);
};
var script = document.createElement('script');
script.src = 'http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20data.headers%20where%20url%3D%22' + encodeURIComponent(iframe.src) + '%22&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=loadHTML';
document.body.appendChild(script);