Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

updated README of Notification proxies with pros and cons

  • Loading branch information...
commit 895ec720592b6fc010f043a6b1f983ee893e2a58 1 parent b237b0a
@tvcutsem authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 notification/
9 notification/
@@ -39,4 +39,11 @@ onEnumerate: function(target) // post-trap receives a "copy of th
onKeys: function(target) // post-trap receives a copy of the result array
onApply: function(target,thisArg,args)
onConstruct: function(target,args)
+== Why Notification Proxies? ==
+ * They avoid the need for costly invariant enforcement checks
+ * They forward operations automatically (no need for traps to forward manually to the target object)
+Proxy abstractions that do not want operations to be forwarded automatically (i.e. that want to change arguments or return values) need to make an extra effort. The basic pattern is that such proxies use a fake "shadow" target which they "set-up" in the "pre-trap" and (if necessary) clean-up in the post-trap.
Please sign in to comment.
Something went wrong with that request. Please try again.