/**
 * Generated by Apache Royale Compiler from org\apache\royale\html\beads\CrossBrowserFireListenerOverrideBead.as
 * org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead
 *
 * @fileoverview
 *
 * @suppress {checkTypes|accessControls}
 */

goog.provide('org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead');

goog.require('goog.events');
goog.require('goog.events.BrowserEvent');
goog.require('org.apache.royale.core.HTMLElementWrapper');
goog.require('org.apache.royale.core.IStrand');
goog.require('org.apache.royale.events.BrowserEvent');
goog.require('org.apache.royale.events.IBrowserEvent');
goog.require('org.apache.royale.events.utils.KeyboardEventConverter');
goog.require('org.apache.royale.events.utils.MouseEventConverter');
goog.require('org.apache.royale.core.IBead');



/**
 *  Constructor.
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.92
 * @constructor
 * @implements {org.apache.royale.core.IBead}
 */
org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead = function() {
  ;
};


/**
 * Prevent renaming of class. Needed for reflection.
 */
goog.exportSymbol('org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead', org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead);


/**
 * @protected
 * @param {Object} listener
 * @param {goog.events.BrowserEvent} eventObject
 * @return {boolean}
 */
org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead.fireListenerOverride = function(listener, eventObject) {
  var /** @type {org.apache.royale.events.IBrowserEvent} */ e;
  var /** @type {Object} */ nativeEvent = eventObject.getBrowserEvent();
  var /** @type {string} */ constructorName = nativeEvent.constructor.toString();
  if (constructorName.indexOf('KeyboardEvent') > -1) {
    e = org.apache.royale.events.utils.KeyboardEventConverter.convert(nativeEvent);
  } else if (constructorName.indexOf('MouseEvent') > -1) {
    e = org.apache.royale.events.utils.MouseEventConverter.convert(nativeEvent);
  } else {
    e = new org.apache.royale.events.BrowserEvent();
  }
  e.wrapEvent(eventObject);
  return org.apache.royale.core.HTMLElementWrapper.googFireListener(listener, e);
};


org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead.prototype.set__strand = function(value) {
  goog.events.fireListener = org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead.fireListenerOverride;
};


Object.defineProperties(org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead.prototype, /** @lends {org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.core.IStrand} */
strand: {
set: org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead.prototype.set__strand}}
);


/**
 * Metadata
 *
 * @type {Object.<string, Array.<Object>>}
 */
org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'CrossBrowserFireListenerOverrideBead', qName: 'org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead', kind: 'class' }], interfaces: [org.apache.royale.core.IBead] };



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'strand': { type: 'org.apache.royale.core.IStrand', access: 'writeonly', declaredBy: 'org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead'}
      };
    },
    methods: function () {
      return {
        'CrossBrowserFireListenerOverrideBead': { type: '', declaredBy: 'org.apache.royale.html.beads.CrossBrowserFireListenerOverrideBead'}
      };
    }
  };
};