I figured out how to do this. yglukhov's jsbind worked like a charm to help with this. Thanks for the awesome library!
Here is a simple to get & set the height of a <div> in Nim.
import dom
import jsbind
type CSSStyleDeclaration* = ref object of JSObj
proc cssText*(cssSD: CSSStyleDeclaration): cstring {.jsimportProp.}
proc length*(cssSD: CSSStyleDeclaration): int {.jsimportProp.}
proc getComputedStyle*(w: Window; element: Element; pseudoElt: Element=nil): CSSStyleDeclaration {.jsimport.}
proc getPropertyValue*(cssSD: CSSStyleDeclaration; property: cstring): cstring {.jsimport.}
# Main Program
proc main() =
var
content = querySelector("#content")
cStyle = window.getComputedStyle(content)
content.innerHTML = cStyle.getPropertyValue("height") # e.g. will say something like "51.2px"
content.style.height = "800px"
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