javascript - React JSDOM - How to access width of an element -


using react testutils , jsdom, how access width of node getdomnode or finddomnode call? cant find api's listed, have work out : someelement.getdomnode().style._values.width, hacky solution. cleaner solution access dom api's

the getdomnode call returns actual dom node can of usual dom operations.

however, jsdom dom emulation library. full layout window has not been implemented it. it's known issue normal offsetwidth , offsetheight properties not work.

the issue discussed here: https://github.com/tmpvar/jsdom/issues/135


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -