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
Public Methods
|
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
}
This method is defined by Browser.
yui-ext - Copyright © 2006 Jack Slocum. |
Yahoo! UI - Copyright © 2006 Yahoo! Inc.
All rights reserved.