//Peter Michaux
    function isHostMethod(object, property) {
        var t = typeof object[property];
        return t == 'function' ||
            (!!(t == 'object' && object[property])) ||
                t == 'unknown';
    }

    result = isHostMethod(xhr, "open"); //true
    result = isHostMethod(xhr, "foo"); //false

 

相关文章:

  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
相关资源
相似解决方案