0

Using this great answer, I am trying to print all the methods of the File object:

alert(Object.getOwnPropertyNames(File).filter(function (p) {
    return typeof File[p] === 'function';
}));

But I get nothing, and the same goes for the FileReader object.

Are these objects not part of the JavaScript standard, or are they simply method-less?

I am testing on Chrome.

halfer
  • 19,471
  • 17
  • 87
  • 173
goodvibration
  • 5,556
  • 4
  • 21
  • 50

1 Answers1

3

You're looking at static methods, callable via File.*().
There aren't any.

You actually want methods on its prototype (callable on instances of File objects). Look at the properties of File.prototype.

SLaks
  • 837,282
  • 173
  • 1,862
  • 1,933