How to use the mithril.endComputation function in mithril

To help you get started, we’ve selected a few mithril examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github barneycarroll / mithril.exitable.js / src / exitable.es6.js View on Github external
// components are removed: it currently believes that already happend
          // Because it ran the diff before we told it to retain the subtree at
          // the last minute
          reverting = true

          // Next draw should not patch, only diff
          mithril.redraw.strategy( 'none' )

          // Force a synchronous draw despite being frozen
          mithril.redraw( true )

          // Now it's as if we were never here to begin with
          reverting = false

          // Resume business as usual
          mithril.endComputation()
        } )
      }
github akx / glitch2 / glitcher / ui.js View on Github external
export function init(engine) {
  const uiContainer = document.createElement('div');
  uiContainer.id = 'ui-container';
  document.body.appendChild(uiContainer);
  m.startComputation();
  const ctrl = m.module(uiContainer, { controller, view });
  ctrl.engine = engine;
  m.endComputation();
}
github RetroShare / RetroShare / libresapi / src / webui-src / app / adddownloads.js View on Github external
function refresh(){
    m.startComputation();
    m.endComputation();
}
github APE-EDX / APE / public / components / target-process.js View on Github external
ipcRenderer.on('procReply', (event, arg) => {
    processes = arg;
    reorderProcesses('name', 'pid');
    m.endComputation();
});
github gitter-badger / moria / moria.js View on Github external
controller : function redirection(){
				var endpoint = to.replace( paramToken, function insertParam( token, param ){
					return m.route.param( param );
				} );

				m.startComputation();

				m.route( endpoint );

				m.endComputation();
			},
			view       : emptyView
github APE-EDX / APE / public / components / project.js View on Github external
ipcRenderer.on('scanned-projects', (event, args) => {
    projects = args;
    m.endComputation();
});
github RetroShare / RetroShare / libresapi / src / webui-src / app / retroshare.js View on Github external
m.sync(requests).then(function trigger_render(){
            m.startComputation();
            m.endComputation();
            checkFocus();
        });
    });
github APE-EDX / APE / public / components / window.js View on Github external
ipcRenderer.on('set-target', (event, resultTarget) => {
	if (resultTarget.result) {
		Notifications.doNotify({title: 'Injection', body: 'APE injection was successful'}, true);
		target = resultTarget;
	}
	else {
		Notifications.doNotify({title: 'Injection', body: 'APE could not inject the DLL'}, true);
		target = null;
	}

	m.endComputation();
});