examples/template_stealjs/funcunit/syn/dist/syn.js
function( event, element, type, autoPrevent ) {

			// dispatchEvent doesn't always work in IE (mostly in a popup)
			if ( element.dispatchEvent && event ) {
				var preventDefault = event.preventDefault,
					prevents = autoPrevent ? -1 : 0;

				//automatically prevents the default behavior for this event
				//this is to protect agianst nasty browser freezing bug in safari
				if ( autoPrevent ) {
					bind(element, type, function( ev ) {
						ev.preventDefault();
						unbind(this, type, arguments.callee);
					});
				}


				event.preventDefault = function() {
					prevents++;
					if (++prevents > 0 ) {
						preventDefault.apply(this, []);
					}
				};
				element.dispatchEvent(event);
				return prevents <= 0;
			} else {
				try {
					window.event = event;
				} catch (e) {}
				//source element makes sure element is still in the document
				return element.sourceIndex <= 0 || (element.fireEvent && element.fireEvent('on' + type, event));
			}
		}
function( event, element, type, autoPrevent ) {

			// dispatchEvent doesn't always work in IE (mostly in a popup)
			if ( element.dispatchEvent && event ) {
				var preventDefault = event.preventDefault,
					prevents = autoPrevent ? -1 : 0;

				//automatically prevents the default behavior for this event
				//this is to protect agianst nasty browser freezing bug in safari
				if ( autoPrevent ) {
					bind(element, type, function( ev ) {
						ev.preventDefault();
						unbind(this, type, arguments.callee);
					});
				}


				event.preventDefault = function() {
					prevents++;
					if (++prevents > 0 ) {
						preventDefault.apply(this, []);
					}
				};
				element.dispatchEvent(event);
				return prevents <= 0;
			} else {
				try {
					window.event = event;
				} catch (e) {}
				//source element makes sure element is still in the document
				return element.sourceIndex <= 0 || (element.fireEvent && element.fireEvent('on' + type, event));
			}
		}
function ( event , element , type , autoPrevent ) { // dispatchEvent doesn't always work in IE (mostly in a popup) if ( element . dispatchEvent && event ) { var preventDefault = event . preventDefault , prevents = autoPrevent ? - 1 : 0 ; //automatically prevents the default behavior for this event //this is to protect agianst nasty browser freezing bug in safari if ( autoPrevent ) { bind ( element , type , function ( ev ) { ev . preventDefault ( ) ; unbind ( this , type , arguments . callee ) ; } ) ; } event . preventDefault = function ( ) { prevents ++ ; if ( ++ prevents > 0 ) { preventDefault . apply ( this , [ ] ) ; } } ; element . dispatchEvent ( event ) ; return prevents <= 0 ; } else { try { window . event = event ; } catch ( e ) { } //source element makes sure element is still in the document return element . sourceIndex <= 0 || ( element . fireEvent && element . fireEvent ( 'on' + type , event ) ) ; } }
triggers an event on an element, returns true if default events should be run 
Dispatches an event and returns true if default events should be run.
@hide
@param {Object} event
@param {Object} element
@param {Object} type
@param {Object} autoPrevent
triggers an event on an element returns true if default events should be run Dispatches an event and returns true if default events should be run .