Eval ("groovy template") in game 1

I'm trying to add groovy pattern to the DOM at a specific point in time as such:

function onload(){
     globalEval();
}
var globalEval = function globalEval() {
    var src = "#{all-tags /};"
    if (window.execScript) {
        window.execScript(src);
        return;
    }
    var fn = function() {
        window.eval.call(window,src);
    };
    fn();
}

      

But the template is immediately displayed, and that's not what it's intended. How can I attach groovy template to DOM only when needed?

+3


source to share





All Articles