UNPKG

electron-devtools-vendor

Version:

<div align="center"> <h2>electron-devtools-vendor</h2> <img alt="MIT" src="https://img.shields.io/github/license/BlackHole1/electron-devtools-vendor?color=9cf&style=flat-square"> <img alt="GitHub repo size" src="https://img.shields.io/github/r

37 lines (27 loc) 1.18 kB
// Collection of AppComponentAction for a specific AppComponentInfo. Modules.set('collections.AppComponentActions', function() { // imports var Collection = Modules.get('collections.Collection'); var AppComponentAction = Modules.get('models.AppComponentAction'); var AppComponentActions = Collection.extend({ // AppComponentInfo this actions belong to appComponentInfo: undefined, // Note: assumes models is empty. initialize: function(models, options) { this.appComponentInfo = options.appComponentInfo; }, // Register a new app component action, by creating its model and by adding it to the collection. // Return the model. register: function(actionAttributes, actionData) { var actionIndex = this.length; var appComponentAction = new AppComponentAction(actionAttributes, { appComponentInfo: this.appComponentInfo, index: actionIndex, data: actionData }); this.add(appComponentAction); return appComponentAction; } }); return AppComponentActions; });