API Docs for: 1.0.0
Show:

gallery-node-event-set Module

Patches Y.Node to provide "set" events for attributes and styles similar to the "change" events provided by Y.Attribute. Simply subscribe to attrSet or styleSet, e.g., valueSet, z-indexSet, or classSet.

IMPORTANT: "set" events will ONLY fire if changes are made through Y.Node, NOT when directly operating on the DOM element. Also NOT when a different sandbox operates on a separate Y.Node instance for the same element.

Note: The valuechange event provided by YUI captures all changes to the element's value attribute, but only when the element has focus.

To minimize the performance impact, this module initially overrides only Y.Node.on(). Patches are then applied to the appropriate functions on individual instances when a "set" event is requested.

set, setAttrs, setAttribute, setStyle, setStyles
Fires attrSet or styleSet event with prevVal, newVal.
setData,clearData
Fires dataSet event with dataKey, prevVal, newVal.
addClass, removeClass, replaceClass
Fires classNameSet event with prevVal, newVal -- consistent with set('className', ...). Also includes addedClass or removedClass, as appropriate.
setX, setY, setXY
Fires xySet event with prevVal and newVal defining x, y, or both.

This module provides the following classes: