1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-14 14:55:51 +01:00

Some small changes for the sake of plugins.

This commit is contained in:
Kris Maglione
2010-12-26 21:54:17 -05:00
parent 8c64d0ec44
commit 8a5eb69492
3 changed files with 40 additions and 15 deletions

View File

@@ -690,10 +690,11 @@ function update(target) {
desc = desc.value.init(k) || desc.value;
if (typeof desc.value == "function" && Object.getPrototypeOf(target)) {
let func = desc.value;
desc.value.superapply = function (self, args)
desc.value.__defineGetter__("super", function () Object.getPrototypeOf(target)[k]);
desc.value.superapply = function superapply(self, args)
let (meth = Object.getPrototypeOf(target)[k])
meth && meth.apply(self, args);
desc.value.supercall = function (self)
desc.value.supercall = function supercall(self)
func.superapply(self, Array.slice(arguments, 1));
}
Object.defineProperty(target, k, desc);