I feel that it should be part of the dom even if its not. You might get a way with just using div.getBoundingClientRect(). I had the same issue. So I added that to the dom.nim. The getComputedStyle() slightly different.
I found dom.nim to be a clean example to how to bind to stuff in js that is or is not part of the dom: [https://github.com/nim-lang/Nim/blob/master/lib/js/dom.nim](https://github.com/nim-lang/Nim/blob/master/lib/js/dom.nim)