Quick referenceAll you need to know in one page
What it is
LemonadeJS is a micro library (Less than 4Kbytes) but still a very powerful library. In this page you can find the most important concept and aspects to learn and start using lemonadejs.
The self objectThe self is a common lemonade object that contains properties and methods that can be invoked from the template making very easy to create highly dynamic elements.
Special propertiesThere are three special properties in lemaondeJS, those are:
@ready:call a method as soon the element is ready on the DOM.
MethodsThere are four methods to help to create the lemandejs components as below:
lemonade.apply(self, DOMElement)bind a new self to an existing elements in the DOM.
lemonade.template(template, self)create a new HTML element from a template and make the self available in the template.
lemonade.render(DOMElement, DOMElement)append a lemanodejs element to an existing DOM element available.
lemonade.blender(template, self, DOMElement)create a new lemonadejs component based on the template, bind the self to this new element and append that to an existing DOM element.
EventsThere are two native events to help interect with lemonade components as follow:
self.onload(component)It happens when the component is ready and mounted.
self.onchange(property, affected)It happens when a property of the self is changed.