ck = [];

/**
 * @type string[]
 */
let focusStack = [];

let handoverBlob = {};
let serverAddress = '';
let frameEscapeFunctions = {};

registerPushFunction(function(type, ...args) {
	switch (type) {
		case 'rootCall': {
			const [ dataString ] = args;
			const data = JSON.parse(dataString);

			if (data.type == 'focusFrame') {
				focusFrame(data.frameName);
			} else if (data.type == 'blurFrame') {
				blurFrame(data.frameName);
			} else if (data.type == 'setHandover') {
				handoverBlob = data.data;
		