From ad996d9cf4e143b17feeee9e4d43542169a7091b Mon Sep 17 00:00:00 2001 From: portix Date: Mon, 4 Mar 2013 12:37:52 +0100 Subject: Use _initNewContext to initialize scripts, change setPrivate/getPrivate api --- scripts/lib/dwb.js | 103 +++++++++++++++++++++++------------------------------ 1 file changed, 44 insertions(+), 59 deletions(-) (limited to 'scripts') diff --git a/scripts/lib/dwb.js b/scripts/lib/dwb.js index 11ebb69f..40743560 100644 --- a/scripts/lib/dwb.js +++ b/scripts/lib/dwb.js @@ -27,21 +27,26 @@ callback.apply(this, modules); } }; - - var _privProps = []; - var _getPrivateIdx = function(object, key, identifier) + var _contexts = {}; + var _setPrivate = function(id, object, key, value) { - var p; - for (var i=0, l=_privProps.length; i