7.3.9 GetMethod ( V, P )

抽象操作 GetMethod 用于在期望属性的值为函数时获取 ECMAScript 语言值的特定属性的值。 使用参数 V P 调用操作,其中 V 是ECMAScript 语言值,P 是属性键。 此抽象操作执行以下步骤:

  1. 断言:IsPropertyKey(P) 为 true
  2. 使 func 变为 ? GetV(V, P)。
  3. 如果 func 不是 undefined null 之一,返回 undefined
  4. 如果 IsCallable(func) 为 false,则抛出一个 TypeError 错误。
  5. 返回 func

results matching ""

    No results matching ""