JSFiddle - React, Tailwind, and code Playground

by ionutzp

HTML

<body></body>

JavaScript

avatar_loaded = function(img) {
  console.log("We loaded an avatar for %s (img)[0].src is %o attr('src') is %o getAttribute('src') is %o", img, jQuery(img)[0].src, jQuery(img).attr('src'), img.getAttribute('src'));
}

var avatar_url = "https://api.twitter.com/1/users/profile_image/60173";

$(window).load(function(){
        var img = new Image();
    $(img).load(function(){avatar_loaded(this)}).attr('src',avatar_url).appendTo('body');
       //jQuery('body').append("<img onload='' src='" + avatar_url + "' width='100' height='100'>");
});