как вариант
(function(name) {
var el = document.createElement("iframe");
document.body.appendChild(el);
window[name] = window.frames[0].Function
})('FunctionX')
FunctionX.prototype.qq = function() {
alert('НЯЯЯ)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!111')
}
var q = FunctionX('', 'alert("fff")')
q()