Advertisement
Guest User

Untitled

a guest
Jul 25th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. let b = object%js
  2. val className = !*"toggle"
  3. val checked = !* (if task.completed then "checked" else ""))
  4. val onClick = fun () -> swap initial_state (fun state -> set_tab !state All)
  5. end
  6. in
  7. Elem (DOM.make ~tag:`input ~elem_spec: ([("type", !* "checkbox")] >>> b ) [])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement