I try to get body width in Linux Firefox.
document.body.scrollWidth is equal to width which I can see in firefox window.
So when I changed window size, document.body.scrollWidth is changed.
But in Google Chrome, It is equal to body width.
My Firefox version is 6.0.
How can I get body width in Firefox/Linux?
Per http://dev.w3.org/csswg/cssom-view/#dom-element-scrollwidth
scrollWidthon the<body>returns the ‘window size’ (or more precisely the actual width of the body box) in standards mode and the document content width in quirks mode (item 3 in the list).It sounds like your page is in standards mode. In which case
document.documentElement.scrollWidthshould do what you wan (item 2 in the list).