I'm trying to receive mouseover events on a FlexJS object whose element is a
<div>. I've discovered this code in
org.apache.flex.events.EventDispatcher.prototype.addEventListener:
/**
* A bit of a hack, but for 'native' HTML element based controls, we
* want to listen to the 'native' events from the element; for other
* types of controls, we listen to 'custom' events.
*/
source = this;
if (this.element && this.element.nodeName &&
this.element.nodeName.toLowerCase() !== 'div' &&
this.element.nodeName.toLowerCase() !== 'body') {
source = this.element;
}
goog.events.listen(source, type, handler);
Since my source (a FlexJS class instance) has a .element of div, the source is
being passed, as is, to goog.events.listen but since the event type is a
"mouseover", I don't see it being handled. I'm thinking this "hack" isn't the
way to go in all cases. Any suggestions?
Thanks,
Peter Ent
Adobe Systems