This page is Not Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.


Property of dom/Elementdom/Element


var result = element.code;
element.code = value;



The code property returns one of the following file error codes.

Constant Code Description
NotFoundError 8 The File or Blob could not be found at the time the read was processed.
SecurityError 18 A file error not covered by the other file error codes occurred, such as:
  • Too many read calls are being made on File or Blob resources.
  • The file has changed on disk since the user selected it.
  • Certain files are unsafe for access within a web application.
AbortError 20 The read operation was aborted, typically with a call to abort.
NotReadableError 0 The File or Blob cannot be read, typically due to permission problems that occur after a reference to a File or Blob has been acquired (that is, concurrent lock with another application).
EncodingError 0 The length of the data URL for a File or Blob is too long.

See FileError for a code example using these error codes.


See also

Related pages