JSFiddle - React, Tailwind, and code Playground

JavaScript

// Create an ifrmae.
var iframe = document.createElement( "iframe" );
document.body.appendChild( iframe );
var win = iframe.contentWindow;
var doc = win.document;
doc.write("<!doctype><html><body></body</html>");

// Inject jQuery
var script = doc.createElement("script");
script.src = "http://code.jquery.com/jquery-git.js";
doc.body.appendChild( script );

// Test it.
setTimeout(function() {
    var elements = $.map( win.jQuery(), function( _, elem ) {
        return elem;
    });
    
    // Should output []
    console.log( elements );
}, 2000);