在Chrome 17中是否弃用window.document.height



我刚刚更新到最新版本的Chrome(17.0.963.56(,似乎window.document.height不再是一个有效的属性。还有其他人注意到这一点吗?我似乎找不到有关其删除的任何文档。

在使用 WebKit 提交错误后,我被告知document.height不是标准属性,WebKit 是唯一维护的供应商支持它(直到现在。MDN 和 WebKit 现在都列出了属性已弃用,建议使用 document.body.clientHeightdocument.body.clientWidth而不是 document.widthdocument/height .

我遇到了同样的问题,window.innerHeight对我有用。文档在这里

最新更新