HTMLDivElement.addMethods(LayerableObjectTrait);
HTMLDivElement.prototype.lookupLayersIn = ["parentNode"];
cop.create("EventRegistrationLayer").refineClass(HTMLDivElement, {
addEventListener: function(eventType, callback) {
cop.withoutLayers([EventRegistrationLayer], function(){
var morph = lively.$(this).data('morph')
console.log("" + morph + ".addEventListener " + eventType)
}.bind(this))
return cop.proceed.apply(this, arguments)
},
removeEventListener: function(eventType, callback) {
cop.withoutLayers([EventRegistrationLayer], function(){
var morph = lively.$(this).data('morph')
console.log("" + morph + ".removeEventListener " + eventType )
}.bind(this))
return cop.proceed.apply(this, arguments)
},
}).beNotGlobal()