I actually tried with an live channel, but had the same result.
I also tried to get the size of a div i made by Document.getElementById() but I was never able to get any properties of the element. If I tried the code in a usual html context it worked so its not a wrong code. Can you give me a brief explanation what you mean exactly?
The result I want to get is to always know how big the place is that I can use for my extension.