TINY VIEW LIBRARY
import { el, mount } from 'frzr';
class Login {
constructor () {
this.el = el('form', { class: 'login' },
this.email = el('input', { type: 'email' }),
this.pass = el('input', { type: 'password' }),
this.submit = el('button', 'Sign in')
);
}
mounted () {
this.el.onsubmit = e => {
e.preventDefault();
var email = this.email.value;
var pass = this.pass.value;
console.log(email, pass);
}
}
}
mount(document.body, el(Login));
Github · Getting started · cdnjs · Production · Development