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

Function initLifecycle

static/vuejs/vue.js:1998–2022  ·  view source on GitHub ↗
(vm)

Source from the content-addressed store, hash-verified

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

Callers 1

initMixinFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected