Class/Object

org.scalajs.dom

FileReader

Related Docs: object FileReader | package dom

Permalink

class FileReader extends EventTarget

The FileReader object lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read.

Annotations
@JSType() @native() @JSGlobal()
Linear Supertypes
EventTarget, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FileReader
  2. EventTarget
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FileReader()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def abort(): Unit

    Permalink

    Aborts the read operation.

    Aborts the read operation. Upon return, the readyState will be DONE.

  5. def addEventListener[T <: Event](type: String, listener: Function1[T, _], options: EventListenerOptions): Unit

    Permalink

    The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on.

    The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).

    This implementation accepts a settings object of type EventListenerOptions.

    Definition Classes
    EventTarget
  6. def addEventListener[T <: Event](type: String, listener: Function1[T, _], useCapture: Boolean = js.native): Unit

    Permalink

    The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on.

    The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).

    Definition Classes
    EventTarget
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def dispatchEvent(evt: Event): Boolean

    Permalink

    Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order.

    Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) apply to events dispatched manually with dispatchEvent().

    Definition Classes
    EventTarget
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def error: DOMException

    Permalink

    A DOMException representing the error that occurred while reading the file.

  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. var onabort: Function1[ProgressEvent, _]

    Permalink

    A handler for the abort event.

    A handler for the abort event. This event is triggered each time the reading operation is aborted.

  23. var onerror: Function1[ProgressEvent, _]

    Permalink

    A handler for the error event.

    A handler for the error event. This event is triggered each time the reading operation encounter an error.

  24. var onload: Function1[ProgressEvent, _]

    Permalink

    A handler for the load event.

    A handler for the load event. This event is triggered each time the reading operation is successfully completed.

  25. var onloadend: Function1[ProgressEvent, _]

    Permalink

    A handler for the loadend event.

    A handler for the loadend event. This event is triggered each time the reading operation is completed (either in success or failure).

  26. var onloadstart: Function1[ProgressEvent, _]

    Permalink

    A handler for the loadstart event.

    A handler for the loadstart event. This event is triggered each time the reading is starting.

  27. var onprogress: Function1[ProgressEvent, _]

    Permalink

    A handler for the progress event.

    A handler for the progress event. This event is triggered while reading a Blob content.

  28. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  29. def readAsArrayBuffer(blob: Blob): Unit

    Permalink

    The readAsArrayBuffer method is used to starts reading the contents of the specified Blob or File.

    The readAsArrayBuffer method is used to starts reading the contents of the specified Blob or File. When the read operation is finished, the readyState becomes DONE, and the loadend is triggered. At that time, the result attribute contains an ArrayBuffer representing the file's data.

  30. def readAsDataURL(blob: Blob): Unit

    Permalink

    The readAsDataURL method is used to starts reading the contents of the specified Blob or File.

    The readAsDataURL method is used to starts reading the contents of the specified Blob or File. When the read operation is finished, the readyState becomes DONE, and the loadend is triggered. At that time, the result attribute contains a data: URL representing the file's data as base64 encoded string.

  31. def readAsText(blob: Blob, encoding: String = js.native): Unit

    Permalink

    The readAsText method is used to read the contents of the specified Blob or File.

    The readAsText method is used to read the contents of the specified Blob or File. When the read operation is complete, the readyState is changed to DONE, the loadend is triggered, and the result attribute contains the contents of the file as a text string.

  32. def readyState: Short

    Permalink

    A number indicating the state of the FileReader.

    A number indicating the state of the FileReader. This will be one of the State constants. EMPTY : 0 : No data has been loaded yet. LOADING : 1 : Data is currently being loaded. DONE : 2 : The entire read request has been completed.

  33. def removeEventListener[T <: Event](type: String, listener: Function1[T, _], options: EventListenerOptions): Unit

    Permalink

    Removes the event listener previously registered with EventTarget.addEventListener.

    Removes the event listener previously registered with EventTarget.addEventListener.

    This implementation accepts a settings object of type EventListenerOptions.

    Definition Classes
    EventTarget
  34. def removeEventListener[T <: Event](type: String, listener: Function1[T, _], useCapture: Boolean = js.native): Unit

    Permalink

    Removes the event listener previously registered with EventTarget.addEventListener.

    Removes the event listener previously registered with EventTarget.addEventListener.

    Definition Classes
    EventTarget
  35. def result: Any

    Permalink

    The file's contents.

    The file's contents. This property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.

  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  37. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  38. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  39. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  40. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from EventTarget

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped