aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/object/getnotifier/index.html
blob: fac0573de33cf804fe3ad880a958101f5d2182fb (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
title: Object.getNotifier()
slug: Web/JavaScript/Reference/Global_Objects/Object/getNotifier
translation_of: Archive/Web/JavaScript/Object.getNotifier
---
<div>{{JSRef}} {{obsolete_header}}</div>

<p><strong><code>Object.getNotifer()</code></strong> 方法用于创建可人工触发 change 事件的对象,但该方法在浏览器中已被废弃。</p>

<h2 id="语法">语法</h2>

<pre class="syntaxbox">Object.getNotifier(<em>obj</em>)</pre>

<h3 id="参数">参数</h3>

<dl>
 <dt><code>obj</code></dt>
 <dd>获取通知的对象。</dd>
</dl>

<h3 id="返回值">返回值</h3>

<p>与传入对象相关联的通知对象。</p>

<h2 id="描述">描述</h2>

<p><code><font face="Open Sans, Arial, sans-serif">通知对象可触发 </font>Object.observe() 所观察到的人工变动。</code></p>

<h2 id="规范">规范</h2>

<p><a href="https://github.com/arv/ecmascript-object-observe">Strawman proposal specification.</a></p>

<h2 id="浏览器兼容性">浏览器兼容性</h2>

<div>{{CompatibilityTable}}</div>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatChrome("36")}} [1]</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatOpera("23")}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Chrome for Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatChrome("36")}} [1]</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatOpera("23")}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>

<p>[1] Deprecated in Chrome 49.</p>

<h2 id="相关链接">相关链接</h2>

<ul>
 <li>{{jsxref("Object.observe()")}} {{obsolete_inline}}</li>
 <li>{{jsxref("Object.unobserve()")}} {{obsolete_inline}}</li>
 <li>{{jsxref("Array.observe()")}} {{obsolete_inline}}</li>
</ul>