Setting the stage for a resource status update mechanism

This commit is contained in:
Jeff Parsons 2017-06-27 16:01:00 -07:00 committed by Jeff Parsons
commit 2cb0be42f0
36 changed files with 872 additions and 773 deletions

View file

@ -147,7 +147,7 @@ class C1PComputer extends Component {
* @this {C1PComputer}
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea")
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "reset")
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {HTMLElement} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {string} [sValue] optional data value
* @return {boolean} true if binding was successful, false if unrecognized binding request
*/

View file

@ -516,7 +516,7 @@ class C1PCPU extends Component {
* @this {C1PCPU}
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea")
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "run")
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {HTMLElement} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {string} [sValue] optional data value
* @return {boolean} true if binding was successful, false if unrecognized binding request
*/

View file

@ -497,7 +497,7 @@ class C1PDebugger extends Component {
* @this {C1PDebugger}
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas")
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "reset")
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {HTMLElement} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {string} [sValue] optional data value
* @return {boolean} true if binding was successful, false if unrecognized binding request
*/

View file

@ -667,7 +667,7 @@ class C1PDiskController extends Component {
* @this {C1PDiskController}
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea")
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "listDisk")
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {HTMLElement} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {string} [sValue] optional data value
* @return {boolean} true if binding was successful, false if unrecognized binding request
*/

View file

@ -398,7 +398,7 @@ class C1PKeyboard extends Component {
* @this {C1PKeyboard}
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea")
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "esc", "ctrl-c")
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {HTMLElement} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {string} [sValue] optional data value
* @return {boolean} true if binding was successful, false if unrecognized binding request
*/

View file

@ -64,7 +64,7 @@ class C1PPanel extends Component {
* @this {C1PPanel}
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas")
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "reset")
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {HTMLElement} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {string} [sValue] optional data value
* @return {boolean} true if binding was successful, false if unrecognized binding request
*/

View file

@ -103,7 +103,7 @@ class C1PSerialPort extends Component {
* @this {C1PSerialPort}
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea")
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "listSerial")
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {HTMLElement} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {string} [sValue] optional data value
* @return {boolean} true if binding was successful, false if unrecognized binding request
*/
@ -148,7 +148,7 @@ class C1PSerialPort extends Component {
submit.disabled = !files.length;
});
control.onsubmit = function(event) {
control.addEventListener('submit', function(event) {
var file = event.currentTarget[1].files[0];
var reader = new FileReader();
@ -162,7 +162,7 @@ class C1PSerialPort extends Component {
* Prevent reloading of web page after form submission
*/
return false;
};
});
}
else {
if (DEBUG) this.log("Local file support not available");

View file

@ -121,9 +121,9 @@ class C1PVideo extends Component {
*
* @this {C1PVideo}
* @param {Object} parmsVideo
* @param {Object} canvas
* @param {Object} context
* @param {Object} imgChars
* @param {HTMLCanvasElement} canvas
* @param {CanvasRenderingContext2D} context
* @param {HTMLImageElement} imgChars
*/
constructor(parmsVideo, canvas, context, imgChars)
{
@ -218,7 +218,7 @@ class C1PVideo extends Component {
* @this {C1PVideo}
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea")
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "refresh")
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {HTMLElement} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {string} [sValue] optional data value
* @return {boolean} true if binding was successful, false if unrecognized binding request
*/
@ -580,7 +580,7 @@ class C1PVideo extends Component {
* I've since settled on a better work-around in keyboard.js, so I've stopped worrying about how to make
* "autocapitalize" work here.
*/
var eCanvas = document.createElement("canvas");
var eCanvas = /** @type {HTMLCanvasElement} */ (document.createElement("canvas"));
if (eCanvas === undefined || !eCanvas.getContext) {
eVideo.innerHTML = "<br/>Missing &lt;canvas&gt; support. Please try a newer web browser.";
return;
@ -619,7 +619,7 @@ class C1PVideo extends Component {
* document.createElement('img') would.
*/
var imgCharSet = new Image();
var eContext = eCanvas.getContext("2d");
var eContext = /** @type {CanvasRenderingContext2D} */ (eCanvas.getContext("2d"));
var video = new C1PVideo(parmsVideo, eCanvas, eContext, imgCharSet);
imgCharSet.onload = function(video, sCharSet) {
return function() {