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
24 lines (18 loc) • 883 B
JavaScript
define(["backbone", "underscore", "models/AppComponent", "backboneAgentClient"],
function(Backbone, _, AppComponent, backboneAgentClient) {
var AppModel = AppComponent.extend({
category: "Model",
// see backbone agent for supported attributes
// print the model attribute value on the console
printAttribute: function(attributeName) {
backboneAgentClient.execFunction(function(componentIndex, attributeName) {
var appModelInfo = this.appComponentsInfos['Model'].at(componentIndex);
var attributeValue = appModelInfo.component.attributes[attributeName];
console.log(attributeName+":", attributeValue);
}, [this.index, attributeName], _.bind(function(result) { // on executed
// do nothing
}, this));
}
});
return AppModel;
});