@ CroNiX
Dont want to split the controlling code and at this momemnt I dont
even see how this will solve the problem of script tags not being
evaluated.

@ Aaron Newton
After reflecting on this for a while I realized it's basically not a
problem of the Request Class but the Element's set method being not
aware of script tags inside html passed as the new element's content.
So I came up with a Element.Properties.html set-method stripping and
then evaluating the scripts just like Request.HTML does.

Element.Properties.html = (function(){
        …
        var html = {
                set: function(){
                        var js, html = 
Array.flatten(arguments).join('').stripScripts
(function(script){
                                js = script;
                        });
                        var wrap = Browser.Engine.trident && 
translations[this.get('tag')];
                        if (wrap){
                                var first = wrapper;
                                first.innerHTML = wrap[1] + html + wrap[2];
                                for (var i = wrap[0]; i--;) first = 
first.firstChild;
                                this.empty().adopt(first.childNodes);
                        } else {
                                this.innerHTML = html;
                        }
                        $exec(js);
                }
        };
        …
})();

Seems to work fine for me (although not really tested yet).
Thanks for the hint Aaaron!

Johannes

Reply via email to