JSFiddle - React, Tailwind, and code Playground

JavaScript

var win = window.open('', '__blank');

// this works, but closure changes the name of the function, so no good
win.someFunction = function() {
    // do some stuff
}
    
// this is how i'd like it to work, but it doesn't
win['someFunction'] = function() {
    // :(   
}