From 067ec6954ce24bea65f739e72b3faa40ab304bef Mon Sep 17 00:00:00 2001 From: kkapsner Date: Thu, 29 Jun 2017 07:31:55 +0200 Subject: [PATCH] Allow the page scripts to overwrite the faked functions. Fixes #121 --- lib/intercept.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/intercept.js b/lib/intercept.js index bf18cd4..85677df 100644 --- a/lib/intercept.js +++ b/lib/intercept.js @@ -99,6 +99,13 @@ else { return original; } + }, window), + set: exportFunction(function(value){ + Object.defineProperty( + constructor.prototype, + name, + {value} + ); }, window) } );