“杀”是什么意思? 用 JavaScript 做什么?
这个 JavaScript 到底做了什么?
parent.kill = 1;
我正在开发的一个项目中使用它来进行某种会话过期,但我以前从未见过它。 它加载在 iframe
中,因此我假设它的目标是 DOM document.window
。
What does this JavaScript do exactly?
parent.kill = 1;
This is used in a project I'm working on to do some sort of session expiration but I've never seen it before. It's loaded in an iframe
so I'm assuming that it is targeting the DOM document.window
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
子 iframe 正在
parent
window
的全局范围内设置变量kill
。 仅从那行 javascript 无法确定parent
对该变量执行的操作。The child iframe is setting the variable
kill
in theparent
window
's global scope. What theparent
does with that variable cannot be determined from just that line of javascript.为了借鉴@crescentfresh的答案,这里是保留关键字的列表。
to piggy-back off @crescentfresh's answer, here is a list of reserved keywords.
我不认为这是语言的一部分——也许是图书馆的一部分?
I don't think that's part of the language - maybe part of a library?