__proto__ for IE9 or IE10

前端 未结 4 566
南笙
南笙 2020-12-17 04:12

Is there any possibility to change the __proto__ property of an object in IE9 or IE10? Or is MS still not planning to include it in their JS engine?

I n

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-17 05:06

    I'm not sure what exactly it is you're after since your question didn't specify, but for most uses of proto, you should be able to use prototype.

    var foo = new Bar();
    //this also affects foo
    Bar.prototype.baz = something;
    

提交回复
热议问题