Yahoo! UI Library

event-valuechange  3.3.0

Yahoo! UI Library > event-valuechange > ValueChange
Search:
 
Filters

static Class ValueChange

Provides the implementation for the synthetic valueChange event.

Properties

POLL_INTERVAL - static Number

Interval (in milliseconds) at which to poll for changes to the value of an element with one or more valueChange subscribers when the user is likely to be interacting with it.
Default Value: 50

TIMEOUT - static Number

Timeout (in milliseconds) after which to stop polling when there hasn't been any new activity (keypresses, mouse clicks, etc.) on an element.
Default Value: 10000

Methods

_onBlur

protected static void _onBlur ( e )
Stops polling when a node's blur event fires.
Parameters:
e <EventFacade>

_onFocus

protected static void _onFocus ( e )
Resets a node's history and starts polling when a focus event occurs.
Parameters:
e <EventFacade>

_onKeyDown

protected static void _onKeyDown ( e )
Starts polling when a node receives a keyDown event.
Parameters:
e <EventFacade>

_onKeyUp

protected static void _onKeyUp ( e )
Starts polling when an IME-related keyUp event occurs on a node.
Parameters:
e <EventFacade>

_onMouseDown

protected static void _onMouseDown ( e )
Starts polling when a node receives a mouseDown event.
Parameters:
e <EventFacade>

_onSubscribe

protected static void _onSubscribe ( node , subscription , notifier )
Called when event-valuechange receives a new subscriber.
Parameters:
node <Node>
subscription <Subscription>
notifier <SyntheticEvent.Notifier>

_onUnsubscribe

protected static void _onUnsubscribe ( node , subscription , notifier )
Called when event-valuechange loses a subscriber.
Parameters:
node <Node>
subscription <Subscription>
notifier <SyntheticEvent.Notifier>

_poll

protected static void _poll ( node , stamp , e )
Called at an interval to poll for changes to the value of the specified node.
Parameters:
node <Node>
stamp <String>
e <EventFacade>

_refreshTimeout

protected static void _refreshTimeout ( node , stamp )
Restarts the inactivity timeout for the specified node.
Parameters:
node <Node>
stamp <String>

_startPolling

protected static void _startPolling ( node , stamp , e , force )
Begins polling for changes to the value property of the specified node. If polling is already underway for the specified node, it will not be restarted unless the force parameter is true
Parameters:
node <Node> Node to watch.
stamp <String> (optional) Object stamp for the node. Will be generated if not provided (provide it to improve performance).
e <EventFacade> (optional) Event facade of the event that initiated the polling (if any).
force <Boolean> (optional) If true, polling will be restarted even if we're already polling this node.

_stopPolling

protected static void _stopPolling ( node , stamp )
Stops polling for changes to the specified node's value attribute.
Parameters:
node <Node>
stamp <String> (optional)

_stopTimeout

protected static void _stopTimeout ( node , stamp )
Clears the inactivity timeout for the specified node, if any.
Parameters:
node <Node>
stamp <String> (optional)


Copyright © 2011 Yahoo! Inc. All rights reserved.