Hi there,
I'm loading in webkit.WebView some page with simple script:

function appendtext(text){
        a=document.body.scrollHeight;
        b=document.body.clientHeight;
        c = document.body.scrollTop;
        var body= document.getElementsByTagName('body')[0];
        var newline= document.createElement('font');
        newline.setAttribute('size','-3');
        newline.innerHTML=text+'<br/>';
        body.appendChild(newline);

        if (a-b==c){
         scroll()}}


and... if I run it inside the page, like this:  <a
onclick="appendtext('blablabla');">test</a> it works fine. But if I
try to run it from code:

self['chat'].execute_script("appendtext('"+text+"');")

it raises error in: var body=
document.getElementsByTagName('body')[0]; saying body is undefined...
why's that?

--
Kuba
_______________________________________________
webkit-gtk mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-gtk

Reply via email to