<commit_before><commit_msg>Added two way binding examples<commit_after>Serenade.view 'form', '''
  form
    h3 "Fill in stuff here"
    p
      label
        "Title"
        input[type="text" binding:keyup=@title]
    p
      label
        "Active"
        input[type="checkbox" binding:change=@active]
    p
      label
        "Body"
        br
        textarea[binding:keyup=@body cols="60" rows="8"]
'''

Serenade.view 'result', '''
  div
    h3 "See this change magically"
    p "Title: " @title
    p "Active: " @active
    p "Body: " @body
'''

class Post extends Serenade.Model
  @property 'title'
  @property 'active', format: (active) -> if active then "yes" else "no"
  @property 'body'

window.aPost = new Post()

window.onload = ->
  document.body.appendChild Serenade.render('form', aPost)
  document.body.appendChild document.createElement("hr")
  document.body.appendChild Serenade.render('result', aPost)
{'fraction_non_alphanumeric': 0.13680781758957655, 'fraction_numerical': 0.0054288816503800215, 'mean_word_length': 3.0262008733624453, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5194442', 'n_tokens_mistral': 301, 'n_tokens_neox': 298, 'n_words': 76}