Spirit async.
@TODO: This should be evaluated after `appendChild` to another position.
@param {gui.Spirit} spirit
351505
function(spirit) {
		spirit.life.async = true;
		spirit.onasync(); // TODO: life cycle stuff goes here
		spirit.life.dispatch(gui.LIFE_ASYNC);
	}
106376
function () {
    var el;
    el = document.createElement('a-entity');
    el.play = this.wrapPlay(el.play);
    el.setAttribute('mixin', this.data.mixin);
    el.object3D.visible = false;
    el.pause();
    this.container.appendChild(el);
    this.availableEls.push(el);
  }
898958
function(spirit) {
		spirit.config.configureall();
		spirit.life.configured = true;
		spirit.onconfigure();
		spirit.life.dispatch(gui.LIFE_CONFIGURE);
	}
169793
function(doc, src) {
		var iframe = doc.createElement("iframe");
		var spirit = this.possess(iframe);
		spirit.css.add("gui-iframe");
		/*
		 * TODO: should be moved to src() method (but fails)!!!!!
		 */
		if (src) {
			if (gui.URL.external(src, doc)) {
				var url = new gui.URL(doc, src);
				spirit.xguest = url.protocol + "//" + url.host;
				//src = this.sign ( src, doc, spirit.$instanceid );
			}
		} else {
			src = this.SRC_DEFAULT;
		}
		iframe.src = src;
		return spirit;
	}
391102
function() {
		gui.Spirit.prototype.onenter.call(this);
		this.event.add('load');
		this.action.addGlobal([ // in order of appearance
			gui.ACTION_DOC_ONDOMCONTENT,
			gui.ACTION_DOC_ONLOAD,
			gui.ACTION_DOC_ONHASH,
			gui.ACTION_DOC_ONSPIRITUALIZED,
			gui.ACTION_DOC_UNLOAD
		]);
		if (this.fit) {
			this.css.height = 0;
		}
		var src = this.element.src;
		if (src && src !== gui.IframeSpirit.SRC_DEFAULT) {
			if (!src.startsWith("blob:")) { // wrong...
				this._setupsrc(src);
			}
		}
	}
685826
function(spirit) {
		spirit.$ondestruct();
		spirit.$destructed = true;
		gui.destruct(spirit);
		gui.GreatSpirit.$meet(spirit);
	}
61795
function(spirit) {
		var incoming = this._spirits.incoming;
		if (incoming.length) {
			var i = incoming.indexOf(spirit);
			if (i > -1) {
				gui.Array.remove(incoming, i);
			}
		}
	}
487797
public final void addChildAfter(Node newChild, @Nullable Node node) {
    checkArgument(newChild.next == null, "The new child node has next siblings.");
    checkArgument(newChild.previous == null, "The new child node has previous siblings.");
    // NOTE: newChild.next remains null
    newChild.previous = newChild;
    addChildrenAfter(newChild, node);
  }
141590
function(type) {
			var result = [],
				spirit, el = this.spirit.element;
			while ((el = el.previousElementSibling)) {
				if (type && (spirit = el.spirit)) {
					if (spirit instanceof type) {
						result.push(spirit);
					}
				} else {
					result.push(el);
				}
			}
			return result;
		}
285102
function() {
		
		/*
		 * Automatically load spirit scripts by naming convention?
		 * ns.MySpirit would automatically load ns.MySpirit.edbml
		 */
		var edbmlscript, basespirit = gui.Spirit.prototype;
		gui.Function.decorateAfter(basespirit, 'onconfigure', function() {
			if (edbml.bootload && !this.script.loaded) {
				edbmlscript = gui.Object.lookup(this.$classname + '.edbml');
				if (gui.Type.isFunction(edbmlscript)) {
					this.script.load(edbmlscript);
				}
			}
		});

		/*
		 * Nasty hack to circumvent that we hardcode "event" into inline poke 
		 * events, this creates an undesired global variable, but fixes an 
		 * exception in the console, at least I think this was the problem.
		 */
		if (!window.event) {
			try {
				window.event = null;
			} catch (ieexception) {}
		}
	}
241363
function(arg) {
		var spirit, element, doc = document;
		switch (gui.Type.of(arg)) {
			case "string":
				if (gui.KeyMaster.isKey(arg)) {
					spirit = this._spirits.inside[arg];
				}
				if (!spirit) {
					try {
						element = doc.querySelector(arg) || doc.querySelector('#' + arg);
					} catch (badselector) {

					} finally {
						spirit = element ? element.spirit : null;
					}
				}
				break;
			case "function":
				var sp, spirits = this._spirits.inside;
				if (gui.Type.isSpiritConstructor(arg)) {
					Object.keys(this._spirits.inside).some(function(key) {
						if (((sp = spirits[key]).constructor === arg)) {
							spirit = sp;
							return true;
						}
					});
				}
				break;
			default:
				if (gui.Type.isElement(arg)) {
					spirit = arg.spirit || null;
				} else {
					throw new TypeError('gui.get(' + arg + ')');
				}
				break;
		}
		return spirit || null;
	}
862379
function(arg, handler) {
		handler = handler ? handler : this.spirit;
		gui.Array.make(arg).forEach(function(type) {
			if (this._addchecks(type, [handler])) {
				if (!this._handlers[type]) {
					this._handlers[type] = [];
				}
				this._handlers[type].push(handler);
			}
		}, this);
		return this.spirit;
	}
234039
function(things) {
				var els = things,
					element = this.spirit.element;
				els.forEach(function(el) {
					element.appendChild(el);
					maybespiritualize(el);
				});
			}
73931
function(spirit) {
		spirit.window.gui.inside(spirit);
		spirit.life.entered = true;
		spirit.onenter();
		spirit.life.dispatch(gui.LIFE_ENTER);
	}
826607
function(spirit) {
		spirit.life.ready = true;
		spirit.onready();
		spirit.life.dispatch(gui.LIFE_READY);
	}
879116
function() {
			gui.Tick.cancelFrame(this._frameindex);
			var spirit = this.spirit;
			var input = this.$input;
			var runnow = function() {
				if (!spirit.life.destructed && (!input || input.done)) {
					this.run();
				}
			}.bind(this);
			if (spirit.life.entered) {
				if (spirit.life.rendered) {
					this._frameindex = gui.Tick.nextFrame(runnow);
				} else {
					runnow();
				}
			} else {
				spirit.life.add(gui.LIFE_ENTER, this);
			}
		}
902609
protected void moveChild(BaseUIComponent child, BaseUIComponent before) {
        child.getParent().addChild(child, before);
    }