1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-08 19:35:53 +01:00

Add :sidebar!. Closes issue #269.

This commit is contained in:
Kris Maglione
2011-01-22 07:14:55 -05:00
parent e8603ed458
commit f33ae2b044
4 changed files with 41 additions and 9 deletions

View File

@@ -208,6 +208,20 @@
</p>
</description>
</item>
<item>
<spec>:sidebar! <oa>name</oa></spec>
<description>
<p>
Toggle the sidebar window. When <oa>name</oa> is provided, the
semantics are as follows: If the named is currently open, it is
closed. Otherwise the sidebar is closed. When <oa>name</oa> is
not provided, the semantics are as follows: If the sidebar is
currently open, it is closed. Otherwise the previously open sidebar
panel is re-opened.
</p>
</description>
</item>
<h2 tag="status-line status-bar">Status line</h2>

View File

@@ -743,15 +743,14 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
* @param {function(XMLHttpRequest)} callback
* @returns {XMLHttpRequest}
*/
httpGet: function httpGet(url, callback) {
httpGet: function httpGet(url, callback, self) {
try {
let xmlhttp = services.Xmlhttp();
xmlhttp.mozBackgroundRequest = true;
if (callback)
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4)
callback(xmlhttp);
};
if (callback) {
xmlhttp.onload = function handler(event) { util.trapErrors(callback, self, xmlhttp, event) };
xmlhttp.onerror = xmlhttp.onload;
}
xmlhttp.open("GET", url, !!callback);
xmlhttp.send(null);
return xmlhttp;