I have just observed that every page has length
global variable.
What does this variable represent? Is it somehow related to how many iframes/frames are loaded on page?
It'd be happy if a doc reference is provided.
For example, on Chrome new tab page its value is 17
and here, on StackOverflow it is 0
.
Yes, it's how many frames (including iframes) are in the current window:
https://developer.mozilla.org/en-US/docs/Web/API/Window.length
W3 specification:
http://www.w3.org/html/wg/drafts/html/master/browsers.html#accessing-other-browsing-contexts
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句