Class Ext.EventManager
Registers event handlers that want to receive a normalized EventObject instead of the standard browser event and provides
several useful events directly.
See
Ext.EventObject for more details on normalized event objects.
This class is a singleton and cannot be created directly.
属性
-
方法
-
事件
公共属性
|
ieDeferSrc : Object |
EventManager |
Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL) |
公共方法
|
addListener(String/HTMLElement element , String eventName , Function fn , Object options ) : void |
EventManager |
加入一个事件处理器 |
|
onDocumentReady(Function fn , Object scope , boolean options ) : void |
EventManager |
Fires when the document is ready (before onload and before images are loaded). Can be
accessed shorthanded Ext.onRea... |
|
onTextResize(Function fn , Object scope , boolean options ) : void |
EventManager |
Fires when the user changes the active text size. Handler gets called with 2 params, the old size and the new size. |
|
onWindowResize(Function fn , Object scope , boolean options ) : void |
EventManager |
Fires when the window is resized and provides resize event buffering (50 milliseconds), passes new viewport width and... |
|
removeListener(String/HTMLElement element , String eventName , Function fn ) : Boolean |
EventManager |
Removes an event handler |
|
removeResizeListener(Function fn , Object scope ) : void |
EventManager |
Removes the passed window resize listener. |
|
wrap(Function fn , Object scope , boolean override ) : Function |
EventManager |
Deprecated. This is no longer needed and is deprecated. Places a simple wrapper around an event handler to override t... |
公共事件
此类没有公共事件。
属性详情
ieDeferSrc
public Object ieDeferSrc
Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL)
This property is defined by EventManager.
方法详情
addListener
public function addListener(String/HTMLElement element
, String eventName
, Function fn
, Object options
)
加入一个事件处理器
参数:
element
: String/HTMLElementThe html element or id to assign the event to
eventName
: StringThe type of event to append
fn
: Function事件调用的方法
options
: ObjectAn object with standard EventManager options
返回:
This method is defined by EventManager.
onDocumentReady
public function onDocumentReady(Function fn
, Object scope
, boolean options
)
Fires when the document is ready (before onload and before images are loaded). Can be
accessed shorthanded Ext.onReady().
This method is defined by EventManager.
onTextResize
public function onTextResize(Function fn
, Object scope
, boolean options
)
Fires when the user changes the active text size. Handler gets called with 2 params, the old size and the new size.
This method is defined by EventManager.
onWindowResize
public function onWindowResize(Function fn
, Object scope
, boolean options
)
Fires when the window is resized and provides resize event buffering (50 milliseconds), passes new viewport width and height to handlers.
This method is defined by EventManager.
removeListener
public function removeListener(String/HTMLElement element
, String eventName
, Function fn
)
This method is defined by EventManager.
removeResizeListener
public function removeResizeListener(Function fn
, Object scope
)
Removes the passed window resize listener.
参数:
fn
: Function事件调用的方法
scope
: ObjectThe scope of handler
返回:
This method is defined by EventManager.
wrap
public function wrap(Function fn
, Object scope
, boolean override
)
Deprecated. This is no longer needed and is deprecated. Places a simple wrapper around an event handler to override the browser event
object with a Ext.EventObject
参数:
fn
: Function事件调用的方法
scope
: ObjectAn object that becomes the scope of the handler
override
: booleanIf true, the obj passed in becomes the execution scope of the listener
返回:
Function
The wrapped function
This method is defined by EventManager.