[Project_owners] JSON and extensions

Eric H. Jung grimholtz at yahoo.com
Fri Mar 3 17:35:12 EST 2006



--- Nickolay Ponomarev <asqueella at gmail.com> wrote:

> On 3/3/06, Eric H. Jung <grimholtz at yahoo.com> wrote:
> > > Also what does typeof (new MyClass()) return in a HTML page, and from a
> > > chrome script?
> >
> > They both return "object"
> >
> As I suggested on the mozillazine forums, try (new MyClass())
> instanceof Object. This check fails for me when and only when the JSON
> call fails to work. Figuring out why their code returns null is
> something you could easily do yourself, though.


I could do it easily only if I understood the code at http://www.json.org/json.js. I don't
understand this syntax:

var JSON = function () {
  var m = {...},
  ...,
  return {
    stringify: function (v) {}
    };
}();

What the heck is that? That's about as comprehesible as http://www0.us.ioccc.org/2004/gavare.c



> 
> Nickolay
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
> 



More information about the Project_owners mailing list