You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Food for thought: Maybe a couple of simple JS functions should be defined on top of the JS API? Here for example is a function that will populate a DOM element identified by idwith the answer(s) to goal:
function populate(template, goal, id) {
var pengine = new Pengine({
ask: goal,
template: template,
onsuccess: function() {
document.getElementById(id).innerHTML = this.data[0]
}
});
return pengine;
}
I've been thinking about this for a while. I'd love to see a logical, reactive end to end framework built on pengines. I've been fiddling around, more with designs than code, but am not happy with what I have.
If you don't know 'angularjs' , (I think react is similar) you might want to look at it just as a model of what might happen.
Angular's big issue is that it's only on the browser. I'd like to make that distinction more transparent.
Food for thought: Maybe a couple of simple JS functions should be defined on top of the JS API? Here for example is a function that will populate a DOM element identified by
id
with the answer(s) togoal
:Test with:
Seems mostly useful for deterministic queries and should perhaps support only those? If so, we can replace the line
with
and we don't need
populate()
to return anything.The text was updated successfully, but these errors were encountered: