Final tweaks to initial sticky machine demo

This commit is contained in:
Jeff Parsons 2017-01-03 17:28:35 -08:00 committed by Jeff Parsons
commit 43bec5fd03
7 changed files with 99 additions and 43 deletions

View file

@ -594,6 +594,18 @@ function embedPDP11(idMachine, sXMLFile, sXSLFile, sParms)
return embedMachine("PDPjs", "pdp11", APPVERSION, idMachine, sXMLFile, sXSLFile, sParms);
}
/**
* findMachineComponent(idMachine, sType)
*
* @param {string} idMachine
* @param {string} sType
* @return {Component|null}
*/
function findMachineComponent(idMachine, sType)
{
return Component.getComponentByType(sType, idMachine + ".machine");
}
/**
* Prevent the Closure Compiler from renaming functions we want to export, by adding them as global properties.
*/
@ -611,5 +623,7 @@ if (APPNAME == "PDPjs") {
window['embedPDP11'] = embedPDP11;
}
window['findMachineComponent'] = findMachineComponent;
window['enableEvents'] = Web.enablePageEvents;
window['sendEvent'] = Web.sendPageEvent;