aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/canvasrenderingcontext2d/drawwidgetasonscreen/index.html
blob: 4ea928da29fb6c7b66f973daeb88418930513a24 (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
---
title: CanvasRenderingContext2D.drawWidgetAsOnScreen()
slug: Web/API/CanvasRenderingContext2D/drawWidgetAsOnScreen
tags:
  - CanvasRenderingContext2D
translation_of: Web/API/CanvasRenderingContext2D/drawWidgetAsOnScreen
---
<div>{{APIRef}} {{non-standard_header}}</div>

<div>这个内部使用非标准的Canvas 2D API 的方法<code><strong>CanvasRenderingContext2D.drawWidgetAsOnScreen()为Canvas(画布)上的窗口提供了根部件。不像</strong></code>{{domxref("CanvasRenderingContext2D.drawWindow", "drawWindow()")}}这个API,它使用操作系统来获取屏幕上部件的快照而不是从Gecko自己的组合中读取</div>

<p> </p>

<p>这个API用在Web内容上。它只支持Windows系统中Chrome进程中使用OMTC的小部件</p>

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

<pre class="syntaxbox">void <var><em>ctx</em>.</var>drawWidgetAsOnScreen<var>(window);</var>
</pre>

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

<dl>
 <dt><code>window</code></dt>
 <dd> {{domxref("Window")}} 提供.</dd>
</dl>

<h2 id="说明">说明</h2>

<p>不是当前规范或者草案的一部分. 这是一个内部使用的无标准的API.</p>

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

<p>{{CompatibilityTable}}</p>

<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>{{CompatNo}}</td>
   <td>{{CompatGeckoDesktop(41)}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</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>{{CompatNo}}</td>
   <td>{{CompatGeckoMobile(41)}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="参见">参见</h2>

<ul>
 <li>接口定义,{{domxref("CanvasRenderingContext2D")}}</li>
 <li>{{domxref("CanvasRenderingContext2D.drawWindow()")}}</li>
</ul>