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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user