1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-31 03:25:46 +01:00

Fix some cleanup issues. Better error pages for bad dactyl: URLs. Remove some dead code. Other cleanup.

This commit is contained in:
Kris Maglione
2011-08-21 10:41:46 -04:00
parent ffe138b4e3
commit 5f42595f65
13 changed files with 99 additions and 86 deletions

View File

@@ -851,7 +851,7 @@ Class.extend = function extend(subclass, superclass, overrides) {
* property's value.
* @returns {Class.Property}
*/
Class.memoize = function memoize(getter, wait)
Class.Memoize = Class.memoize = function Memoize(getter, wait)
Class.Property({
configurable: true,
enumerable: true,
@@ -893,6 +893,19 @@ Class.memoize = function memoize(getter, wait)
}
});
/**
* Updates the given object with the object in the target class's
* prototype.
*/
Class.Update = function Update(obj)
Class.Property({
configurable: true,
enumerable: true,
init: function (key, target) {
this.value = update({}, target[key], obj);
}
});
Class.replaceProperty = function replaceProperty(obj, prop, value) {
Object.defineProperty(obj, prop, { configurable: true, enumerable: true, value: value, writable: true });
return value;