Re: [w3c/FileAPI] Disallow mutating state of Blob/File objects (#75)

@annevk Related https://github.com/w3c/FileAPI/issues/99. I.e.g.; at Chromium/Chrome 

```
<!DOCTYPE html>
<html>
<head>
  <style>
    #info {
      font-family: Courier;
      font-size: 0.9em;
    }
  </style>
  <script>
    window.addEventListener('load', function() {
      let size = 0;
      let readFile = file => {
        const reader = new FileReader;
        reader.onload = () => alert(reader.result);
        reader.readAsText(file);
      }
      window.setInterval(function() {
        var logFile = document.querySelector('#file').files[0];
        if (logFile) {
          if (!size) {
            size = logFile.size;
          }
          if (size && logFile.size !== size) {
            size = 0;
            readFile(logFile);
          }
          document.querySelector('#info').innerHTML = '<br/>' +
            (new Date()).toString() + '<br/>Last modified: ' +
            logFile.lastModified +
            '<br/>Size: ' +
            logFile.size;
        }
      }, 1000);
    });
  </script>
</head>
<body>
  <input type="file" id="file" />
  <p id="info"></p>
</body>
</html>
```
Awaiting verification that the behaviour at Chromium/Chrome is in fact a bug, will then file bug report.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/FileAPI/issues/75#issuecomment-390418808

Received on Saturday, 19 May 2018 17:07:51 UTC