Init UI from JS code