marko-widgets
Version:
Module to support binding of behavior to rendered UI components rendered on the server or client
33 lines (24 loc) • 717 B
JavaScript
var expect = require('chai').expect;
module.exports = require('marko-widgets').defineComponent({
template: require.resolve('./template.marko'),
init: function() {
this.logOutput = [];
this.name = 'app-dom-events';
var slef = this;
function log(data) {
slef.logOutput.push(data);
}
this.log = log;
this.clearLog = function() {
this.logOutput = [];
};
this.logOutput = [];
},
handleFooLinkDblClick: function() {
this.log('#fooLink:dblclick');
},
handleFooLinkMouseOut: function(event, el) {
expect(event.target).to.equal(el);
this.log('#fooLink:mouseout');
}
});