JavaScript window object element properties

梦想的初衷 提交于 2019-12-05 21:38:49

This is a non-standard IE-only behavior and should not be used.

[1] [2] [3]

This is not a standard feature, supported only by IE and, in some cases, Opera. It may also be affected by whether the browser is in quirks mode, and whether the element has a name attribute.

To your second point, rhino does not contain a DOM implementation itself, so the question does not apply. That is, there is no HTML interpreter built-in, so there will be no additional variables.

env.js is a DOM implementation for rhino, providing an HTML interpreter. Since IDs as window scope variables is not a web standard, and the env project aims to be standards compliant, you will not see the described behavior there either.

Hope this helps!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!