const {Button, TextView, contentView} = require('tabris');

new Button({
  centerX: true, top: 100,
  text: 'Show message'
}).onSelect(() => {
  textView.text = 'Tabris.js rocks!';
}).appendTo(contentView);

const textView = new TextView({
  centerX: true, top: 'prev() 50',
  font: '24px'
}).appendTo(contentView);

const {Button, TextView, contentView} = require('tabris');

contentView.append(
  Button({
    centerX: true, top: 100,
    text: 'Show message',
    onSelect: () => $(TextView).only().text = 'Tabris.js rocks!'
  }),
  TextView({
    centerX: true, top: 'prev() 50',
    font: '24px'
  })
);

Update vanilla JavaScript template to use factory API
Update vanilla JavaScript template to use factory API

Change-Id: Id749e798a355e16e8dc597bb977de33e6de52f67
