In "old" enyo for HPalm devices I was able to call my enyo kind functions from/via JS like this:
<span class="button" onclick="app.doSomething();"></span>
Now in enyoJS it doesn't work. My app.js looks like this:
enyo.kind({
name: "myapp.Application",
kind: "enyo.Application",
view: "myapp.MainView"
});
enyo.ready(function () {
new myapp.Application({name: "app"});
});
I tried pretty much everything I could think of, but nothing seams to do the trick anymore.
var app = new myapp.MainView();
app.renderInto(document.body);
app.doSomething();
^ etc does not work either.
My MainView:
enyo.kind({
name: "myapp.MainView",
kind: "FittableRows",
classes: "enyo-fit enyo-unselectable",
fit: true,
components:[
//... stuff here ...
],
doSomething: function(){
console.log("Hello!");
}
});
Is there a way how to achieve what I need? TYVM