JSFiddle - React, Tailwind, and code Playground

by Lazaro Contreras

HTML

<img/>

JavaScript

var img = document.querySelector('img');
var xhr = new XMLHttpRequest();
xhr.open('get','https://jsfiddle.net/img/logo.png');
xhr.responseType = 'arraybuffer';
xhr.onload = function(e){
	var imgFile = new Blob([this.response],{type: 'image/png'});
  img.src = URL.createObjectURL(imgFile);
}
xhr.send();