aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/window/personalbar
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/window/personalbar
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/window/personalbar')
-rw-r--r--files/zh-cn/web/api/window/personalbar/index.html73
1 files changed, 73 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/window/personalbar/index.html b/files/zh-cn/web/api/window/personalbar/index.html
new file mode 100644
index 0000000000..e689c2cfff
--- /dev/null
+++ b/files/zh-cn/web/api/window/personalbar/index.html
@@ -0,0 +1,73 @@
+---
+title: Window.personalbar
+slug: Web/API/Window/personalbar
+translation_of: Web/API/Window/personalbar
+---
+<div>{{APIRef}}</div>
+
+<h2 id="概要"><span class="short_text" id="result_box" lang="zh-CN"><span>概要</span></span></h2>
+
+<p>返回 <code>personalbar</code> 对象,其可见性可以在窗口中切换。</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox"><em>objRef</em> =<em>window</em>.personalbar
+</pre>
+
+<h2 id="示例">示例</h2>
+
+<p>{{todo('https://bugzilla.mozilla.org/show_bug.cgi?id=790023')}}</p>
+
+<p>{{deprecated_inline}} The following complete HTML example shows the way that the visible property of the various "bar" objects is used, and also the change to the privileges necessary to write to the visible property of any of the bars on an existing window. Due to <a href="https://developer.mozilla.org/en-US/docs/Bypassing_Security_Restrictions_and_Signing_Code" title="https://developer.mozilla.org/en-US/docs/Bypassing_Security_Restrictions_and_Signing_Code">deprecation of enablePrivilege</a> this functionality can not be used in web pages. EnablePrivilege is disabled in Firefox 15 and will be removed in Firefox 17.</p>
+
+<pre class="brush:html">&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Various DOM Tests&lt;/title&gt;
+
+&lt;script&gt;
+// changing bar states on the existing window
+netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
+window.personalbar.visible = !window.personalbar.visible;
+&lt;/script&gt;
+
+&lt;/head&gt;
+&lt;body&gt;
+ &lt;p&gt;Various DOM Tests&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+</pre>
+
+<h2 id="笔记">笔记</h2>
+
+<p>When you load the example page above, the browser displays the following dialog: <img src="https://mdn.mozillademos.org/files/550/Modify_any_open_window_dialog.png" style="height: 262px; width: 607px;"></p>
+
+<p>To toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above. Also be aware that dynamically updating the visibilty of the various toolbars can change the size of the window rather dramatically, and may affect the layout of your page.</p>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', 'browsers.html#dom-window-personalbar', 'Window.personalbar')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML5 W3C', 'browsers.html#dom-window-personalbar', 'Window.personalbar')}}</td>
+ <td>{{Spec2('HTML5 W3C')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="相关链接">相关链接</h2>
+
+<ul>
+ <li>{{domxref("window.locationbar")}}, {{domxref("window.menubar")}}, {{domxref("window.scrollbars")}}, {{domxref("window.statusbar")}}, {{domxref("window.toolbar")}}</li>
+</ul>