WebReflection / hyperHTML

A Fast & Light Virtual DOM Alternative
ISC License
3.07k stars 113 forks source link

offsetWidth and offseHeight return 0 #384

Closed mqxim closed 4 years ago

mqxim commented 4 years ago

Hello, now i`m working on the project which uses hyperHTML, I'm trying to get offsetWidth and offsetHeight of the element but it always returns 0, could you help me please, what am i doing wrong?

    public created(): void {
        this.render();

        console.log(this.offsetWidth,this.offsetHeight); // always 0 0
    }

I am using HyperHTMLElement with typescript How can i get element width and height?

WebReflection commented 4 years ago

as I've no idea what your render() contains, I've also no idea how to answer your question.

Moreover, I don't understand the use case, so there's room for improvements in this issue.

WebReflection commented 4 years ago

Closing until there is something to test.