MCPcopy Create free account
hub / github.com/TruthHun/BookStack / initLifecycle

Function initLifecycle

static/vuejs/vue.runtime.js:1994–2018  ·  view source on GitHub ↗
(vm)

Source from the content-addressed store, hash-verified

1992var activeInstance = null;
1993
1994function initLifecycle (vm) {
1995 var options = vm.$options;
1996
1997 // locate first non-abstract parent
1998 var parent = options.parent;
1999 if (parent && !options.abstract) {
2000 while (parent.$options.abstract && parent.$parent) {
2001 parent = parent.$parent;
2002 }
2003 parent.$children.push(vm);
2004 }
2005
2006 vm.$parent = parent;
2007 vm.$root = parent ? parent.$root : vm;
2008
2009 vm.$children = [];
2010 vm.$refs = {};
2011
2012 vm._watcher = null;
2013 vm._inactive = null;
2014 vm._directInactive = false;
2015 vm._isMounted = false;
2016 vm._isDestroyed = false;
2017 vm._isBeingDestroyed = false;
2018}
2019
2020function lifecycleMixin (Vue) {
2021 Vue.prototype._update = function (vnode, hydrating) {

Callers 1

initMixinFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected