3 | import Web.Internal.FilePrim
4 | import Web.Internal.Types
17 | {auto 0 _ : JSType t2}
18 | -> {auto 0 _ : Elem BlobPropertyBag (Types t2)}
19 | -> (blobParts : Optional
35 | -> (options : Optional t2)
37 | new' a b = primJS $
Blob.prim__new (toFFI a) (optUp b)
41 | new = primJS $
Blob.prim__new undef undef
46 | {auto 0 _ : JSType t1}
47 | -> {auto 0 _ : Elem Blob (Types t1)}
50 | size a = primJS $
Blob.prim__size (up a)
55 | {auto 0 _ : JSType t1}
56 | -> {auto 0 _ : Elem Blob (Types t1)}
59 | type a = primJS $
Blob.prim__type (up a)
64 | {auto 0 _ : JSType t1}
65 | -> {auto 0 _ : Elem Blob (Types t1)}
67 | -> JSIO (Promise ArrayBuffer)
68 | arrayBuffer a = primJS $
Blob.prim__arrayBuffer (up a)
73 | {auto 0 _ : JSType t1}
74 | -> {auto 0 _ : Elem Blob (Types t1)}
76 | -> (start : Optional JSInt64)
77 | -> (end : Optional JSInt64)
78 | -> (contentType : Optional String)
80 | slice' a b c d = primJS $
81 | Blob.prim__slice (up a) (toFFI b) (toFFI c) (toFFI d)
85 | {auto 0 _ : JSType t1}
86 | -> {auto 0 _ : Elem Blob (Types t1)}
89 | slice a = primJS $
Blob.prim__slice (up a) undef undef undef
94 | {auto 0 _ : JSType t1}
95 | -> {auto 0 _ : Elem Blob (Types t1)}
97 | -> JSIO ReadableStream
98 | stream a = primJS $
Blob.prim__stream (up a)
103 | {auto 0 _ : JSType t1}
104 | -> {auto 0 _ : Elem Blob (Types t1)}
106 | -> JSIO (Promise String)
107 | text a = primJS $
Blob.prim__text (up a)
115 | {auto 0 _ : JSType t3}
116 | -> {auto 0 _ : Elem FilePropertyBag (Types t3)}
117 | -> (fileBits : Array
132 | -> (fileName : String)
133 | -> (options : Optional t3)
135 | new' a b c = primJS $
File.prim__new a b (optUp c)
154 | -> (fileName : String)
156 | new a b = primJS $
File.prim__new a b undef
160 | lastModified : (obj : File) -> JSIO JSInt64
161 | lastModified a = primJS $
File.prim__lastModified a
165 | name : (obj : File) -> JSIO String
166 | name a = primJS $
File.prim__name a
173 | length : (obj : FileList) -> JSIO Bits32
174 | length a = primJS $
FileList.prim__length a
178 | item : (obj : FileList) -> (index : Bits32) -> JSIO (Maybe File)
179 | item a b = tryJS "FileList.item" $
FileList.prim__item a b
183 | namespace FileReader
201 | new : JSIO FileReader
202 | new = primJS $
FileReader.prim__new
206 | error : (obj : FileReader) -> JSIO (Maybe DOMException)
207 | error a = tryJS "FileReader.error" $
FileReader.prim__error a
211 | onabort : FileReader -> Attribute False Maybe EventHandlerNonNull
212 | onabort v = fromNullablePrim
213 | "FileReader.getonabort"
220 | onerror : FileReader -> Attribute False Maybe EventHandlerNonNull
221 | onerror v = fromNullablePrim
222 | "FileReader.getonerror"
229 | onload : FileReader -> Attribute False Maybe EventHandlerNonNull
230 | onload v = fromNullablePrim
231 | "FileReader.getonload"
238 | onloadend : FileReader -> Attribute False Maybe EventHandlerNonNull
239 | onloadend v = fromNullablePrim
240 | "FileReader.getonloadend"
247 | onloadstart : FileReader -> Attribute False Maybe EventHandlerNonNull
248 | onloadstart v = fromNullablePrim
249 | "FileReader.getonloadstart"
251 | prim__setOnloadstart
256 | onprogress : FileReader -> Attribute False Maybe EventHandlerNonNull
257 | onprogress v = fromNullablePrim
258 | "FileReader.getonprogress"
260 | prim__setOnprogress
265 | readyState : (obj : FileReader) -> JSIO Bits16
266 | readyState a = primJS $
FileReader.prim__readyState a
270 | result : (obj : FileReader) -> JSIO (Maybe (Union2 String ArrayBuffer))
271 | result a = tryJS "FileReader.result" $
FileReader.prim__result a
275 | abort : (obj : FileReader) -> JSIO ()
276 | abort a = primJS $
FileReader.prim__abort a
280 | readAsArrayBuffer :
281 | {auto 0 _ : JSType t2}
282 | -> {auto 0 _ : Elem Blob (Types t2)}
283 | -> (obj : FileReader)
286 | readAsArrayBuffer a b = primJS $
FileReader.prim__readAsArrayBuffer a (up b)
290 | readAsBinaryString :
291 | {auto 0 _ : JSType t2}
292 | -> {auto 0 _ : Elem Blob (Types t2)}
293 | -> (obj : FileReader)
296 | readAsBinaryString a b = primJS $
FileReader.prim__readAsBinaryString a (up b)
301 | {auto 0 _ : JSType t2}
302 | -> {auto 0 _ : Elem Blob (Types t2)}
303 | -> (obj : FileReader)
306 | readAsDataURL a b = primJS $
FileReader.prim__readAsDataURL a (up b)
311 | {auto 0 _ : JSType t2}
312 | -> {auto 0 _ : Elem Blob (Types t2)}
313 | -> (obj : FileReader)
315 | -> (encoding : Optional String)
317 | readAsText' a b c = primJS $
FileReader.prim__readAsText a (up b) (toFFI c)
321 | {auto 0 _ : JSType t2}
322 | -> {auto 0 _ : Elem Blob (Types t2)}
323 | -> (obj : FileReader)
326 | readAsText a b = primJS $
FileReader.prim__readAsText a (up b) undef
330 | namespace FileReaderSync
333 | new : JSIO FileReaderSync
334 | new = primJS $
FileReaderSync.prim__new
338 | readAsArrayBuffer :
339 | {auto 0 _ : JSType t2}
340 | -> {auto 0 _ : Elem Blob (Types t2)}
341 | -> (obj : FileReaderSync)
343 | -> JSIO ArrayBuffer
344 | readAsArrayBuffer a b = primJS $
345 | FileReaderSync.prim__readAsArrayBuffer a (up b)
349 | readAsBinaryString :
350 | {auto 0 _ : JSType t2}
351 | -> {auto 0 _ : Elem Blob (Types t2)}
352 | -> (obj : FileReaderSync)
355 | readAsBinaryString a b = primJS $
356 | FileReaderSync.prim__readAsBinaryString a (up b)
361 | {auto 0 _ : JSType t2}
362 | -> {auto 0 _ : Elem Blob (Types t2)}
363 | -> (obj : FileReaderSync)
366 | readAsDataURL a b = primJS $
FileReaderSync.prim__readAsDataURL a (up b)
371 | {auto 0 _ : JSType t2}
372 | -> {auto 0 _ : Elem Blob (Types t2)}
373 | -> (obj : FileReaderSync)
375 | -> (encoding : Optional String)
377 | readAsText' a b c = primJS $
378 | FileReaderSync.prim__readAsText a (up b) (toFFI c)
382 | {auto 0 _ : JSType t2}
383 | -> {auto 0 _ : Elem Blob (Types t2)}
384 | -> (obj : FileReaderSync)
387 | readAsText a b = primJS $
FileReaderSync.prim__readAsText a (up b) undef
397 | namespace BlobPropertyBag
401 | (type : Optional String)
402 | -> (endings : Optional EndingType)
403 | -> JSIO BlobPropertyBag
404 | new' a b = primJS $
BlobPropertyBag.prim__new (toFFI a) (toFFI b)
407 | new : JSIO BlobPropertyBag
408 | new = primJS $
BlobPropertyBag.prim__new undef undef
413 | {auto 0 _ : JSType t}
414 | -> {auto 0 _ : Elem BlobPropertyBag (Types t)}
416 | -> Attribute False Optional EndingType
417 | endings v = fromUndefOrPrimNoDefault
418 | "BlobPropertyBag.getendings"
421 | (v :> BlobPropertyBag)
426 | {auto 0 _ : JSType t}
427 | -> {auto 0 _ : Elem BlobPropertyBag (Types t)}
429 | -> Attribute True Optional String
430 | type v = fromUndefOrPrim
431 | "BlobPropertyBag.gettype"
435 | (v :> BlobPropertyBag)
439 | namespace FilePropertyBag
442 | new' : (lastModified : Optional JSInt64) -> JSIO FilePropertyBag
443 | new' a = primJS $
FilePropertyBag.prim__new (toFFI a)
446 | new : JSIO FilePropertyBag
447 | new = primJS $
FilePropertyBag.prim__new undef
452 | {auto 0 _ : JSType t}
453 | -> {auto 0 _ : Elem FilePropertyBag (Types t)}
455 | -> Attribute False Optional JSInt64
456 | lastModified v = fromUndefOrPrimNoDefault
457 | "FilePropertyBag.getlastModified"
459 | prim__setLastModified
460 | (v :> FilePropertyBag)