Object.defineProperty for all browsers?

后端 未结 3 1178
青春惊慌失措
青春惊慌失措 2021-02-02 12:04

Asking about Object.defineProperty as demonstrated below:

function testComponent(){
    var testProperty;
    Object.defineProperty(this, \"testProperty\",
    {         


        
3条回答
  •  时光说笑
    2021-02-02 12:50

    For older IEs you'd have to make sure your property is a dom object (even a fake tag) and use onPropertyChange to get notified. See this post by John Dyer for more details.

提交回复
热议问题