IE9 allow you to set the __proto__ property?

Discussion in 'Javascript' started by Eric, Mar 16, 2011.

  1. Eric

    Eric Guest

    My understanding is that as of IE8, pretty much all browsers except
    for IE would allow you to set the __proto__ property of an object.
    Has this changed with IE9?

    -Eric
    Eric, Mar 16, 2011
    #1
    1. Advertising

  2. Eric wrote:
    > My understanding is that as of IE8, pretty much all browsers except
    > for IE would allow you to set the __proto__ property of an object.
    > Has this changed with IE9?


    I tried

    var foo = { bar: 'baz' };
    foo.__proto__ = { foobar: 'test' };
    foo.foobar

    with IE 9 release candidate, that gives "undefined". So I don't think
    the new script engine in IE 9 implements any __proto__ "magic", like
    Spidermonkey does.

    --

    Martin Honnen
    http://msmvps.com/blogs/martin_honnen/
    Martin Honnen, Mar 16, 2011
    #2
    1. Advertising

  3. Michael Haufe (\TNO\), Mar 16, 2011
    #3
  4. Eric

    David Mark Guest

    On Mar 16, 5:20 pm, "Michael Haufe (\"TNO\")"
    <> wrote:
    > On Mar 16, 12:20 pm, Eric <> wrote:
    >
    > > My understanding is that as of IE8, pretty much all browsers except
    > > for IE would allow you to set the __proto__ property of an object.
    > > Has this changed with IE9?

    >
    > __proto__ is considered harmful and will be removed with any luck:
    >
    > https://mail.mozilla.org/pipermail/es-discuss/2011-February/012893.html


    +1

    Never needed it. Can't imagine using something with no real IE
    equivalent.
    David Mark, Mar 21, 2011
    #4
  5. On Mar 21, 3:26 pm, David Mark <> wrote:
    > On Mar 16, 5:20 pm, "Michael Haufe (\"TNO\")"
    >
    > <> wrote:
    > > On Mar 16, 12:20 pm, Eric <> wrote:

    >
    > > > My understanding is that as of IE8, pretty much all browsers except
    > > > for IE would allow you to set the __proto__ property of an object.
    > > > Has this changed with IE9?

    >
    > > __proto__ is considered harmful and will be removed with any luck:

    >
    > >https://mail.mozilla.org/pipermail/es-discuss/2011-February/012893.html

    >
    > +1
    >
    > Never needed it.  Can't imagine using something with no real IE
    > equivalent.


    I spoke too soon maybe:

    https://mail.mozilla.org/pipermail/es-discuss/2011-March/013131.html
    Michael Haufe (\TNO\), Mar 21, 2011
    #5
  6. Eric

    David Mark Guest

    On Mar 21, 5:34 pm, "Michael Haufe (\"TNO\")"
    <> wrote:
    > On Mar 21, 3:26 pm, David Mark <> wrote:
    >
    >
    >
    > > On Mar 16, 5:20 pm, "Michael Haufe (\"TNO\")"

    >
    > > <> wrote:
    > > > On Mar 16, 12:20 pm, Eric <> wrote:

    >
    > > > > My understanding is that as of IE8, pretty much all browsers except
    > > > > for IE would allow you to set the __proto__ property of an object.
    > > > > Has this changed with IE9?

    >
    > > > __proto__ is considered harmful and will be removed with any luck:

    >
    > > >https://mail.mozilla.org/pipermail/es-discuss/2011-February/012893.html

    >
    > > +1

    >
    > > Never needed it.  Can't imagine using something with no real IE
    > > equivalent.

    >
    > I spoke too soon maybe:
    >
    > https://mail.mozilla.org/pipermail/es-discuss/2011-March/013131.html


    I know. I guess he uses it for something.
    David Mark, Mar 21, 2011
    #6
  7. Eric

    RobG Guest

    On Mar 17, 7:20 am, "Michael Haufe (\"TNO\")"
    <> wrote:
    > On Mar 16, 12:20 pm, Eric <> wrote:
    >
    > > My understanding is that as of IE8, pretty much all browsers except
    > > for IE would allow you to set the __proto__ property of an object.
    > > Has this changed with IE9?

    >
    > __proto__ is considered harmful and will be removed with any luck:
    >
    > https://mail.mozilla.org/pipermail/es-discuss/2011-February/012893.html


    No luck, there is a replacement:

    "This property is deprecated and should not be used
    in new code: use Object.getPrototypeOf instead."

    MDC, "__proto__", 5 Oct 2010
    <https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/
    Object/proto>


    --
    Rob
    RobG, Mar 21, 2011
    #7
  8. On Mar 21, 6:35 pm, RobG <> wrote:
    > On Mar 17, 7:20 am, "Michael Haufe (\"TNO\")"
    >
    > <> wrote:
    > > On Mar 16, 12:20 pm, Eric <> wrote:

    >
    > > > My understanding is that as of IE8, pretty much all browsers except
    > > > for IE would allow you to set the __proto__ property of an object.
    > > > Has this changed with IE9?

    >
    > > __proto__ is considered harmful and will be removed with any luck:

    >
    > >https://mail.mozilla.org/pipermail/es-discuss/2011-February/012893.html

    >
    > No luck, there is a replacement:
    >
    >   "This property is deprecated and should not be used
    >    in new code: use Object.getPrototypeOf instead."
    >
    > MDC, "__proto__", 5 Oct 2010
    > <https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/
    > Object/proto>


    I was concerned more with a writable __proto__ than a readable one.
    Michael Haufe (\TNO\), Mar 21, 2011
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cbare
    Replies:
    8
    Views:
    185
    John G Harris
    Oct 31, 2007
  2. cbare
    Replies:
    1
    Views:
    105
    cbare
    Nov 1, 2007
  3. Replies:
    1
    Views:
    130
    Douglas Crockford
    Apr 27, 2008
  4. Yan Huang

    mimicking __proto__ in Opera

    Yan Huang, Oct 12, 2009, in forum: Javascript
    Replies:
    10
    Views:
    158
  5. Asen Bozhilov
    Replies:
    3
    Views:
    200
    Dmitry A. Soshnikov
    Apr 14, 2010
Loading...

Share This Page