Global event handlers

Lists global event handlers

By
DomstormU 0 Seen 9 times
Tags
events
Run this test now.

Results

This module appears to be new to the system. Please run the test, to view the results.

User Script (ENUM_FUNCTION)

					
function test(data){
// data is the input variable that is supplied from the Enumeration List.

// For this module, we don't process the input data.
  addResult(data.prop, data.val);

}


					
				

Enum Data (ENUM_FUNCTION)

					
var data = []; // This Array is going to be populated with our enumeration result.
var x;
for(x in window){
  if(typeof window[x] == "number"){
    var obj = {};
    obj.prop = x;
    obj.val = window[x];
    data.push(obj);
  }
}

// what if the array is empty now?
if(data.length === 0){
    var obj = {};
    obj.prop = 'This browser doesn\'t have any Number properties on the Window Object';
    obj.val = ''; // Empty data
    data.push(obj);
}