Is it possible to create something that similar to:
var jsfile = "code....";
(a=(b=document).createElement('script')).src=jsfile;
b.body.appendChild(a);
where 'jsfile' is like an external js file but in our case will be a variable?
All of my tests failed and I succeeded to get the input of 'jsfile' but if there were function inside of obj (remember I want it to preform like an external js file) they didn't executed.
Example for a test:
var jsfile = "code....";
(a=(b=document).createElement('script')).text=(jsfile);
b.body.appendChild(a);