1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 10:08:00 +01:00

Cleanup some docs. Fix completion sizing bug.

This commit is contained in:
Kris Maglione
2009-01-10 23:15:33 -05:00
parent f7accd657a
commit de9e366f12
3 changed files with 50 additions and 21 deletions

View File

@@ -1015,17 +1015,38 @@ function Options() //{{{
liberator.echoerr("E488: Trailing characters: " + name + "!");
},
/**
* Pushes a new preference context onto the context stack.
*
* @see #withContext
*/
pushContext: function ()
{
prefContexts.push({});
},
/**
* Pops the top preference context from the stack.
*
* @see #withContext
*/
popContext: function ()
{
for (let [k, v] in Iterator(prefContexts.pop()))
storePreference(k, v);
},
/**
* Executes <b>fn</b> with a new preference context. When <b>fn</b>
* returns, the context is popped and any preferences set via
* {@link #setPref} or {@link #invertPref} are restored to their
* previous values.
*
* @param {function} fn The function to call.
* @param {object} fn The 'this' object with which to call <b>fn</b>
* @see #pushContext
* @see #popContext
*/
withContext: function (fn, self)
{
try