Print Friendly

# Class YAHOO.ext.util.Browser

Package: | YAHOO.ext.util
Class: | Browser
Extends: | Object
Defined In: | yutil.js

This class is a singleton and cannot be created directly.

## Public Properties

Property | Defined By
--- | ---
| isGecko : Boolean | Browser
| isIE : Boolean | Browser
| isIE7 : Boolean | Browser
| isMac : Boolean | Browser
| isOpera : Boolean | Browser
| isSafari : Boolean | Browser
| isWindows : Boolean | Browser

## Public Methods

Method | Defined By
--- | ---
| fireDirect() : void | Browser
Enable custom handler signature and event cancelling. Using fireDirect() instead of fire() calls the subscribed event...

## Public Events

This class has no public events.

## Property Details

### isGecko

`public Boolean isGecko`
This property is defined by Browser.

### isIE

`public Boolean isIE`
This property is defined by Browser.

### isIE7

`public Boolean isIE7`
This property is defined by Browser.

### isMac

`public Boolean isMac`
This property is defined by Browser.

### isOpera

`public Boolean isOpera`
This property is defined by Browser.

### isSafari

`public Boolean isSafari`
This property is defined by Browser.

### isWindows

`public Boolean isWindows`
This property is defined by Browser.

## Method Details

### fireDirect

`public function fireDirect()`
Enable custom handler signature and event cancelling. Using fireDirect() instead of fire() calls the subscribed event handlers with the exact parameters passed to fireDirect, instead of the usual (eventType, args[], obj). IMO this is more intuitive and promotes cleaner code. Also, if an event handler returns false, it is returned by fireDirect and no other handlers will be called.
Example:

    if(beforeUpdateEvent.fireDirect(myArg, myArg2) !== false){
    // do update
    }

Parameters:

- None.

Returns:

- `void`

This method is defined by Browser.

Copyright © 2006 Jack Slocum. All rights reserved.