Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module File

module File : sig..end

File API See also the documentation of the API.


class type blob = object..end
type 'a make_blob = 
  ?contentType:string ->
  ?endings:[ `Native | `Transparent ] -> 'a -> blob Js.t
val blob_from_string : string make_blob
val blob_from_any : 
  [ `arrayBuffer of Typed_array.arrayBuffer Js.t
  | `arrayBufferView of Typed_array.arrayBufferView Js.t
  | `blob of blob Js.t
  | `js_string of Js.js_string Js.t
  | `string of string ] list make_blob
class type file = object..end
type file_any
module CoerceTo : sig..end
class type fileList = object..end
class type fileError = object..end
class type ['a]progressEvent = object..end
class type progressEventTarget = object..end
type readyState =  | EMPTY | LOADING | DONE
class type fileReader = object..end
module ReaderEvent : sig..end
val filename : file Js.t -> Js.js_string Js.t

filename handles old firefox without name property

val fileReader : fileReader Js.t Js.constr
val addEventListener : 
  (#progressEventTarget as 'a) Js.t ->
  'b Dom.Event.typ ->
  ('a Js.t, 'b) Dom.event_listener -> bool Js.t -> Dom.event_listener_id

Add an event listener. This function matches the addEventListener DOM method, except that it returns an id for removing the listener.