0

Classyフレームワークの次の行を理解できません。

/* we check if $super is in use by a class if we can.  But first we have to
 check if the JavaScript interpreter supports that.  This also matches
 to false positives later, but that does not do any harm besides slightly
 slowing calls down. */
  var probe_super = (function(){$super();}).toString().indexOf('$super') > 0;
  function usesSuper(obj) {
    return !probe_super || /\B\$super\b/.test(obj.toString());
  }

いつ、どのようにして probe_super が false を返すようにしますか?

4

1 に答える 1

0

コメントが言ったように、JavaScript インタープリターがそれをサポートしているかどうかを確認することなので、JavaScript インタープリターに依存して何もできません。

于 2012-06-04T03:45:56.313 に答える