MCPcopy Index your code
hub / github.com/ygs-code/vue / wrappedHook

Function wrappedHook

vue.js:3129–3137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3127 var oldHook = def[hookKey];
3128
3129 function wrappedHook() {
3130 //执行钩子函数
3131 hook.apply(this, arguments);
3132 // important: remove merged hook to ensure it's called only once
3133 // and prevent memory leak
3134 //重要:删除合并钩子以确保只调用一次
3135 //和防止内存泄漏
3136 remove(invoker.fns, wrappedHook);
3137 }
3138
3139 if (isUndef(oldHook)) { //如果旧的钩子函数没有 为空的时候
3140 // no existing hook 无现有钩 则创建一个钩子函数

Callers

nothing calls this directly

Calls 1

removeFunction · 0.85

Tested by

no test coverage detected