Oddbean new post about | logout

Notes by 9905baf2 | export

 @2fd7551e 

<input id=user>

user.onchange = () => {
  let input = document.createElement('input');
  input.type = 'email';
  input.required = true;
  input.value = user.value;
  if (input.validity.valid) {
    // show error message
  }
};

https://output.jsbin.com/jafovub/quiet 
Event not found
 @7725718e @cf8c0364 Option 1 would effectively force developers to always put nested blocks *after* declarations. This would make the CSS code simpler. Without this restriction, you can intertwine declarations and nested blocks, which can make the code messy.