define('event', [], function() {
	function addEvent(el, eventName, command, named) {
		var named = named || 'undefined';
		el['_event'] = el['_event'] || {};
		el['_event'][eventName] = el['_event'][eventName] || {};
		el['_event'][eventName][named] = el['_event'][eventName][named] || [];
		el['_event'][eventName][named].push(command);
	}

	function removeEvent(el, eventName, named) {
		if (el['_event']) {
			if (named && el['_event'][eventName]) {
				el['_event'][eventName][named] = [];
			} else {
				el['_event'][eventName] = {};
			}
		}
	}

	function eventsCommandsFor(el, eventName, named) {
		if (named) {
			if (el['_event'] && el['_event'][eventName]) {
				return el['_event'][eventName][named] || [];
			}
			return [];
		}
		var commands = [];
		if (el['_event']) {
			for (key in el['_event'][eventName]) {
				commands = commands.concat(el['_event'][eventName][key]);
			}
		}
		return commands;
	}

	return {
		addEvent : function(el, eventName, command, namedOrConfigs) {
			var named;
			if (typeof namedOrConfigs === "string") {
				named = namedOrConfigs;
			} else if (typeof namedOrConfigs === "object") {
				named = namedOrConfigs.named;
			}

			if (el.addEventListener) {
				if (namedOrConfigs && namedOrConfigs.passive){
					el.addEventListener(eventName, command, namedOrConfigs);
				} else {
					el.addEventListener(eventName, command);
				}
				addEvent(el, eventName, command, named);
			} else {
				var newCommand = function() {
					return command.apply(el, arguments);
				};
				el.attachEvent("on" + eventName, newCommand);
				addEvent(el, eventName, newCommand, named);
			}
		},
		removeEvent : function(el, eventName, named) {
			var commands = eventsCommandsFor(el, eventName, named);
			for (var i = 0; i < commands.length; i++) {
				if (el.removeEventListener) {
					el.removeEventListener(eventName, commands[i]);
				} else {
					el.detachEvent('on' + eventName, commands[i]);
				}
			}
			removeEvent(el, eventName, named);
		}
	}
});

@@ -914,16 +914,363 @@
 ds;%0A%09%7D%0A%0A
+%09function supportsPassive() %7B%0A%09%09var supportsPassive = false;%0A%09%09try %7B%0A%09%09%09var opts = Object.defineProperty(%7B%7D, 'passive', %7B%0A%09%09%09%09get: function() %7B%0A%09%09%09%09%09supportsPassive = true;%0A%09%09%09%09%7D%0A%09%09%09%7D);%0A%09%09%09window.addEventListener(%22testPassive%22, null, opts);%0A%09%09%09window.removeEventListener(%22testPassive%22, null, opts);%0A%09%09%7D catch (e) %7B%7D%0A%0A%09%09return supportsPassive;%0A%09%7D%0A%0A
 %09return 
@@ -1386,16 +1386,16 @@
 === 
-%22
+'
 string
-%22
+'
 ) %7B%0A
@@ -1466,16 +1466,16 @@
 === 
-%22
+'
 object
-%22
+'
 ) %7B%0A
@@ -1548,24 +1548,31 @@
 ) %7B%0A%09%09%09%09if (
+typeof 
 namedOrConfi
@@ -1574,18 +1574,99 @@
 Configs 
-&&
+=== 'object')%7B%0A%09%09%09%09%09if(namedOrConfigs.passive && !supportsPassive()) %7B%0A%09%09%09%09%09%09delete
  namedOr
@@ -1680,18 +1680,24 @@
 .passive
-)%7B
+;%0A%09%09%09%09%09%7D
 %0A%09%09%09%09%09el
@@ -1979,12 +1979,12 @@
 ent(
-%22on%22
+'on'
  + e

add verification of support passive