event.data transfer.files
Within the files array there is an object for each file containing name, fileSize, etc.
I can't figure out how to decode the object being returned, nor can i find a way to see the object to start debugging. Here is my function.
assetArea : Html Msg
assetArea =
div [ class "asset-area"
, onWithOptions "dragenter" (Options True True) (Json.succeed (DropEvent "dragenter"))
, onWithOptions "dragover" (Options True True) (Json.succeed (DropEvent "dragover"))
, onWithOptions "drop" (Options True True) (Json.map (\x -> log "whatever" x) (Json.succeed (DropEvent "drop")))
]
[ text "Drop here" ]
Here is an example in Js.
https://jsfiddle.net/0GiS0/4ZYq3/
I've read the Json.decoder docs, but still having trouble. Can someone point me in the right direction?
--
You received this message because you are subscribed to a topic in the Google Groups "Elm Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elm-discuss/fELMwWMd1Qw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.