VirtualElement
Class defined in ui/VirtualElement.js#23 inherits from

A virtual DOMElement which is used by the Component API.

A VirtualElement is just a description of a DOM structure. It represents a virtual DOM mixed with Components. This virtual structure needs to be compiled to a Component to actually create a real DOM element.

new VirtualElement()
Constructor defined in ui/VirtualElement.js#25
this.ref(ref)
Method defined in ui/VirtualElement.js#53

Associates a reference identifier with this element.

When rendered the corresponding component is stored in the owner using the given key. In addition to that, components with a reference are preserved when its parent is rerendered.

Parameters

ref | String | id for the compiled Component

VirtualElement.createElement(elementType, props)
Static Method defined in ui/VirtualElement.js#612

Create a virtual DOM representation which is used by Component for differential/reactive rendering.

Parameters

elementType |  | HTML tag name or Component class
[props] |  | a properties object for Component classes

Returns

VirtualElement | a virtual DOM node

Example

Create a virtual DOM Element

    $$('a').attr({href: './foo'}).addClass('se-nav-item')

Create a virtual Component

    $$(HelloMessage, {name: 'John'})