Why does jQuery.Event use preventDefault as an instance test?

Why does jQuery.Event use preventDefault as an instance test?

On a discussion elsewhere ( http://tinyurl.com/3tcm6l5), I ran across the fact that jQuery.Event starts like this:

  1. jQuery.Event = function( src ) {
  2.     // Allow instantiation without the 'new' keyword
  3.     if ( !this.preventDefault ) {
  4.         return new jQuery.Event( src );
  5.     }

I'm curious as to why it's done this way rather than the more obvious

  1. jQuery.Event = function( src ) {
  2.     // Allow instantiation without the 'new' keyword
  3.     if (!(this instanceof jQuery.Event) ) {
  4.         return new jQuery.Event( src );
  5.     }

Although the current code works, if someone somehow did this:

  1. jQuery.preventDefault = true;

it would wreak havoc   This would stop events from processing, except those constructed with "new" and would overwrite the jQuery.type function, and perhaps steal your girlfriend.

Is there some reason that the more obvious code won't work?

  -- Scott