看例子

var xml:XML =<s/>;
trace(xml.ddd);//空串
trace(typeof(xml.ddd));//xml
trace(xml.ddd.toString());//空串
trace(xml.ddd.toXMLString());//空串
trace(xml.ddd.length());//0

足以证明,xml是个特殊的object

var xml:Object = {};
trace(xml.ddd);
//undefined
trace(typeof(xml.ddd));//undefined
trace(xml.ddd.toString());//报错
trace(xml.ddd.toXMLString());//报错
trace(xml.ddd.length());//报错

 

回头看看这个帖子,感觉自己当初好傻,貌似是有了Proxy类以后就比较好解释这个问题了吧

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2021-07-21
  • 2021-11-29
  • 2022-02-14
猜你喜欢
  • 2021-05-23
  • 2021-10-29
  • 2022-12-23
  • 2021-06-30
  • 2022-01-21
  • 2022-01-11
  • 2021-10-07
相关资源
相似解决方案