Must built-in prototypes also be valid instances? (Was: Why DataView.prototype object's [[Class]] is "Object"?)

Kevin Smith khs4473 at gmail.com
Tue Oct 2 10:18:26 PDT 2012


> private @FooBrand;
> class Foo {
>    constructor() {
>         /* establish the internal Fooness of the instance */
>         this. at FooBrand = true;
>    }
> }
> Foo.isFoo = function (obj) {return !!obj. at FooBrand};
>

Using this strategy, will isFoo not fail, if the specified object came from
a different global context (frame)?

Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121002/7229fd6e/attachment.html>


More information about the es-discuss mailing list