Support for scripts on web pages

This commit is contained in:
Jeff Parsons 2017-01-25 09:44:06 -08:00 • committed by Jeff Parsons
commit c37cb26800
4 changed files with 28 additions and 17 deletions

File diff suppressed because one or more lines are too long

View file

@ -14,10 +14,10 @@ machines:
sticky: top
commands:
bootXXDP: |
select rl11 listDrives RL0
select rl11 listDisks "XXDP+ Diagnostics"
load rl11
boot rl11
select rl11 listDrives RL0;
select rl11 listDisks "XXDP+ Diagnostics";
click rl11 loadDisk;
click rl11 bootDisk
---
This machine is ready to boot [XXDP+ Diagnostics](/disks/dec/rl02k/xxdp/) ("BOOT RL0") and run

View file

@ -105,7 +105,9 @@ class Component {
this.name = parms['name'];
this.comment = parms['comment'];
this.parms = parms;
this['exports'] = {};
this['bindings'] = {};
var i = this.id.indexOf('.');
if (i < 0) {
@ -129,7 +131,6 @@ class Component {
this.fnReady = null;
this.clearError();
this.bindings = {};
this.bitsMessage = bitsMessage || 0;
/** @type {Object|null} controlPrint is the HTML control, if any, that we can print to */

View file

@ -112,6 +112,9 @@ function commandMachine(idMachine, sComponent, sCommand, sValue)
if (window.findMachineComponent) {
var component = window.findMachineComponent(idMachine, sComponent);
if (component) {
if (sCommand == "script") {
window.alert("script(" + sValue + ")");
} else {
var exports = component['exports'];
if (exports) {
var fnCommand = exports[sCommand];
@ -125,6 +128,7 @@ function commandMachine(idMachine, sComponent, sCommand, sValue)
}
}
}
}
console.log("unimplemented: commandMachine('" + idMachine + "','" + sComponent + "','" + sCommand + "','" + sValue + "')");
}