Event
The event utility provides functions to add and remove event listeners.
defined in: base.js
Namespace
Methods
- Event. add (targets, type, fn, scope) <static> Adds an event listener.similar to addEventListener in DOM3 Events
- Event. delegate (targets, eventType, selector, fn, scope) <static>
- Event. fire (targets, eventType, eventData, onlyHandlers) <static> fire event,simulate bubble in browser.
- Event. fireHandler (targets, eventType, eventData) <static> does not cause default behavior to occur does not bubble up the DOM hierarchy
- Event. remove (targets, type, fn, scope) <static> Detach an event or set of events from an element.
- Event. undelegate (targets, eventType, selector, fn, scope) <static>
Methods Detail
-
Adds an event listener.similar to addEventListener in DOM3 Events
Defined in:add.js.- Parameters
-
- targets KISSY selector
- type {String} The type of event to append.use space to separate multiple event types.
- fn {Function} The event handler/listener.
- [ scope ] {Object} The scope (this reference) in which the handler function is executed.
-
Defined in:event.js.- Parameters
-
- targets KISSY selector
- [ eventType ] {String} The type of event to delegate. use space to separate multiple event types.
- selector {String|Function} filter selector string or function to find right element
- [ fn ] {Function} The event handler/listener.
- [ scope ] {Object} The scope (this reference) in which the handler function is executed.
-
fire event,simulate bubble in browser. similar to dispatchEvent in DOM3 Events
- Parameters
-
- targets html nodes
- eventType {String|Event.Object} event type
- [ eventData ] additional event data
- [ onlyHandlers ] {Boolean} only fire handlers
- Returns
-
- {Boolean} The return value of fire/dispatchEvent indicates whether any of the listeners which handled the event called preventDefault. If preventDefault was called the value is false, else the value is true.
-
does not cause default behavior to occur does not bubble up the DOM hierarchy
- Parameters
-
- targets
- eventType {Event.Object | String}
- [ eventData ]
-
Detach an event or set of events from an element. similar to removeEventListener in DOM3 Events
Defined in:remove.js.- Parameters
-
- targets KISSY selector
- [ type ] {String} The type of event to remove. use space to separate multiple event types.
- [ fn ] {Function} The event handler/listener.
- [ scope ] {Object} The scope (this reference) in which the handler function is executed.
-
Defined in:event.js.- Parameters
-
- targets KISSY selector
- [ eventType ] {String} The type of event to undelegate. use space to separate multiple event types.
- selector {String|Function} filter selector string or function to find right element
- [ fn ] {Function} The event handler/listener.
- [ scope ] {Object} The scope (this reference) in which the handler function is executed.
Classes
- Anim
- Anim.Easing
- Attribute
- Base
- Button
- ComboBox
- ComboBox.LocalDataSource
- ComboBox.RemoteDataSource
- Component
- Component.Container
- Component.Controller
- Component.Manager
- Component.Render
- Component.UIBase
- Component.UIBase.Align
- Component.UIBase.Box
- Component.UIBase.Close
- Component.UIBase.Constrain
- Component.UIBase.ContentBox
- Component.UIBase.Drag
- Component.UIBase.Loading
- Component.UIBase.Mask
- Component.UIBase.Position
- Component.UIBase.Resize
- Component.UIBase.StdMod
- Cookie
- DataLazyload
- DD
- DD.Constrain
- DD.DDM
- DD.Draggable
- DD.DraggableDelegate
- DD.Droppable
- DD.DroppableDelegate
- DD.Proxy
- DD.Scroll
- DOM
- Editor
- Editor.Range
- Editor.Utils
- Editor.Walker
- Event
- Event.Object
- Event.Target
- IO
- IO.XhrObject
- KISSY
- KISSY.Defer
- KISSY.Loader
- KISSY.Loader.Module
- KISSY.Loader.Package
- KISSY.Promise
- Menu
- Menu.FilterMenu
- Menu.Item
- Menu.PopupMenu
- Menu.Separator
- MenuButton
- MenuButton.Option
- MenuButton.Select
- MVC
- MVC.Collection
- MVC.Model
- MVC.Router
- MVC.View
- NodeList
- Overlay
- Overlay.Dialog
- Overlay.Popup
- Resizable
- Tree
- Tree.CheckNode
- Tree.CheckTree
- Tree.Node
- Waterfall
- Waterfall.Loader