首页 > js代码解读?

js代码解读?

function(a, b) {
  var c = this,
    d = this,
    e = {
      name: a,
      targetScope: this,
      preventDefault: function() {
        e.defaultPrevented = !0
      },
      defaultPrevented: !1
    };
  if (!this.$$listenerCount[a]) return e;
  for (var f = Ya([e], arguments, 1), h, l; c = d;) {
    e.currentScope = c;
    d = c.$$listeners[a] || [];
    h = 0;
    for (l = d.length; hr && (M = 4 - r, O[M] || (O[M] = []), O[M].push({
        msg: G(b.exp) ? "fn: " + (b.exp.name || b.exp.toString()) : b.exp,
        newVal: f,
        oldVal: h
      }));
      else if (b ===
        d) {
        n = !1;
        break a
      }
    }
    catch (A) {
      g(A)
    }
    if (!(k = t.$$childHead || t !== this && t.$$nextSibling))
      for (; t !== this && !(k = t.$$nextSibling);) t = t.$parent
  }
  while (t = k);
  if ((n || m.length) && !r--) throw v.$$phase = null, c("infdig", a, O);
}
while (n || m.length);
for (v.$$phase = null; F.length;) try {
  F.shift()()
} catch (x) {
  g(x)
}
}

为什么最近大家都流行拿被压缩合并的js代码,稍微格式化下,然后来提问逻辑呢,这很难猜的好吧,或者我js文化不够~~建议你拿下源码~

【热门文章】
【热门文章】