Home > Web技術 > Google Chrome のバグっぽいもの

Google Chrome のバグっぽいもの

  • Posted by: ヽ(°▽、°)
  • 2008年9月14日 22:20
  • Web技術

Google Chrome 0.2.149.29 、JavaScript の表示領域取得がうまくできません。


document.documentElement.scrollHeight 8
document.documentElement.clientHeight 500
document.documentElement.scrollWidth 700
document.documentElement.clientWidth 700

※HTML 4.01 Strict

document.documentElement.scrollHeight はブラウザの表示領域の高さをスクロールバー分込みで取得するものですが「8」ってどこから!?「0」ならともかく。
scrollWidth は正しく取得できるのでバグでしょうなぁ。

とりあえず↓でしのげます。
IE, Firefox, Opera, Google Chrome で動作確認済。

var H = ( document.documentElement.clientHeight || document.documentElement.scrollHeight ) ;

Comments:0

Comment Form

Trackbacks:1

TrackBack URL for this entry
http://mt.dsk.jp/mt-tb.cgi/778
Listed below are links to weblogs that reference
Google Chrome のバグっぽいもの from ものつくりサークルDSK
Google Chrome と IE8 と Firefox 3 と from TETLIST 2008-10-15 (水) 13:48
Google Chrome 使ってみました。 なかなか早いです。 一瞬「スクロー...

Home > Web技術 > Google Chrome のバグっぽいもの

Search
Feeds

Return to page top