blob: 8597b6c4a3916cd7d770fc3fa48adb1c73fb29af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
---
title: Object.prototype.__parent__
slug: Web/JavaScript/Reference/Global_Objects/Object/Parent
tags:
- JavaScript
- 原型
- 对象
- 属性
- 已废弃
- 非标准
translation_of: Archive/Web/JavaScript/Object.parent
---
<div>{{JSRef}}{{Non-standard_Header}}{{Obsolete_Header("gecko2")}}</div>
<p>The <strong><code>__parent__</code></strong> property used to point to an object's context, but it has been removed.</p>
<p>指向一个对象的上下文.</p>
<h2 id="语法">语法</h2>
<pre class="syntaxbox"><var>obj</var>.__parent__</pre>
<h2 id="描述">描述</h2>
<p>对于最顶层对象来说,这个属性的值就是全局对象 window。</p>
<h2 id="规范">规范</h2>
<p>不属于任何规范。</p>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
<p>{{Compat("javascript.builtins.Object.parent")}}</p>
<h2 id="参见">参见</h2>
<ul>
<li><a class="external" href="http://whereswalden.com/2010/05/07/spidermonkey-change-du-jour-the-special-__parent__-property-has-been-removed/">SpiderMonkey change du jour: the special __parent__ property has been removed</a></li>
<li><a href="/zh-CN/docs/Components.utils.getGlobalForObject">Components.utils.getGlobalForObject</a></li>
<li><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Object/Proto">__proto__</a></li>
</ul>
|