 frMethods  = {}
 xhrSend    = XMLHttpRequest::send
 fdAppend   = FormData::append
+formSubmit = HTMLFormElement::submit
 
 
 for method in ['readAsDataURL', 'readAsArrayBuffer', 'readAsBinaryString', 'readAsText']



onSubmit = (e) ->
  form     = e.target
  inputs   = form.querySelectorAll 'input'
  jpgs     = []
  formData = new FormData

    else
      fdAppend.call formData, input.name, input.value

  unless jpgs.length
    formSubmit.call @ unless isEvent
    return

  if isEvent
    e.preventDefault()
    e.stopImmediatePropagation()

