src/render/browser/render/register.js
function registerModuleEventListener (name, module, meta) {
  if (name !== 'globalEvent') {
    module['addEventListener'] = function (evt, callbackId, options) {
      return addEventListener.call(this, name, evt, callbackId, options)
    }
    module['removeAllEventListeners'] = function (evt) {
      return removeAllEventListeners.call(this, name, evt)
    }
    ; [{
      name: 'addEventListener',
      args: ['string', 'function', 'object']
    }, {
      name: 'removeAllEventListeners',
      args: ['string']
    }].forEach(info => meta[name].push(info))
  }
}
function registerModuleEventListener (name, module, meta) {
  if (name !== 'globalEvent') {
    module['addEventListener'] = function (evt, callbackId, options) {
      return addEventListener.call(this, name, evt, callbackId, options)
    }
    module['removeAllEventListeners'] = function (evt) {
      return removeAllEventListeners.call(this, name, evt)
    }
    ; [{
      name: 'addEventListener',
      args: ['string', 'function', 'object']
    }, {
      name: 'removeAllEventListeners',
      args: ['string']
    }].forEach(info => meta[name].push(info))
  }
}
function registerModuleEventListener ( name , module , meta ) { if ( name !== 'globalEvent' ) { module [ 'addEventListener' ] = function ( evt , callbackId , options ) { return addEventListener . call ( this , name , evt , callbackId , options ) } module [ 'removeAllEventListeners' ] = function ( evt ) { return removeAllEventListeners . call ( this , name , evt ) } ; [ { name : 'addEventListener' , args : [ 'string' , 'function' , 'object' ] } , { name : 'removeAllEventListeners' , args : [ 'string' ] } ] . forEach ( info => meta [ name ] . push ( info ) ) } }
register module event listener for every api module except 'globalEvent'.
register module event listener for every api module except globalEvent .