JavaScript Ninja – A Property Descriptor That Does Not Sucks! – To Be Used For Support Checker For capture/passive/mozSystemGroup and same structure to be used later for useCapture/wantsUntrusted arguments

the idea is that we define attribute,
the system “looks” for it by name,
when it tries to trigger a read – we use a getter to just maintain whom were tried to access for read by the system,

var supported = {passive: false};

function getter(property_name){	//method is triggered by webkit tries to read the property.
  return undefined;	            //we don't actually care about the property...

function get_descriptor(property_name){
  var descriptor = {
    configurable: false	                              //property is in same-type and can not be deleted.
   ,enumerable:   false                               //property is hidden from object's attribute's-enumerations.
   ,set:          undefined                           //triggered when accessing the property to read its value.
   ,get:          function(){ return getter(property_name); }     //triggered when accessing the property to read its value.
  return descriptor;


var options = {};

Object.defineProperty(options, "passive", get_descriptor("passive"));