Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

Why is FileReader.onerror not called in readAsArrayBuffer on NS_ERROR_FILE_ACCESS_DENIED? (Chrome does)

  • 1 件の返信
  • 1 人がこの問題に困っています
  • 3 回表示
  • 最後の返信者: guigs

more options

When reading a file via javascript readAsArrayBuffer and file is not readable, Firefox does not call "onerror" handler and instead stops the javascript with error: NS_ERROR_FILE_ACCESS_DENIED

blob = file.slice(0,1); var reader = new FileReader; reader.onerror = function(e) {

  // this is called under Chrome, but not under Firefox
  console.log('reader.onerror'); 

} reader.readAsArrayBuffer(blob); // this stops with NS_ERROR_FILE_ACCESS_DENIED

According to FileAPI it should: https://developer.mozilla.org/en-US/docs/Web/API/FileReader

When reading a file via javascript readAsArrayBuffer and file is not readable, Firefox does not call "onerror" handler and instead stops the javascript with error: NS_ERROR_FILE_ACCESS_DENIED blob = file.slice(0,1); var reader = new FileReader; reader.onerror = function(e) { // this is called under Chrome, but not under Firefox console.log('reader.onerror'); } reader.readAsArrayBuffer(blob); // this stops with NS_ERROR_FILE_ACCESS_DENIED According to FileAPI it should: https://developer.mozilla.org/en-US/docs/Web/API/FileReader

すべての返信 (1)

more options