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,824
  • 17
  • 99
  • 186
goodvibration
  • 5,980
  • 4
  • 28
  • 61

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
  • 868,454
  • 176
  • 1,908
  • 1,964