Fail more gracefully on pre-IE9 browsers (still room for improvement though)
This commit is contained in:
parent
d8debb5e3c
commit
fcb7c32909
6 changed files with 43 additions and 9 deletions
|
|
@ -1648,7 +1648,7 @@ if (DEBUGGER) {
|
|||
var aEnable = this.parseCommand(sEnable.replace("keys","key").replace("kbd","keyboard"));
|
||||
if (aEnable.length) {
|
||||
for (var m in Debugger.MESSAGES) {
|
||||
if (aEnable.indexOf(m) >= 0) {
|
||||
if (usr.indexOf(aEnable, m) >= 0) {
|
||||
this.bitsMessage |= Debugger.MESSAGES[m];
|
||||
this.println(m + " messages enabled");
|
||||
}
|
||||
|
|
@ -1683,7 +1683,7 @@ if (DEBUGGER) {
|
|||
* @return {number}
|
||||
*/
|
||||
Debugger.prototype.getRegIndex = function(sReg) {
|
||||
return Debugger.REGS.indexOf(sReg.toUpperCase());
|
||||
return usr.indexOf(Debugger.REGS, sReg.toUpperCase());
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2720,8 +2720,12 @@ Video.prototype.onLoadSetFonts = function(sFontFile, sFontData, nErrorCode)
|
|||
}
|
||||
/*
|
||||
* If we're still here, then we're ready!
|
||||
*
|
||||
* UPDATE: Per issue #21, I'm issuing setReady() *only* if a valid contextScreen exists *or* a Debugger is attached.
|
||||
*
|
||||
* TODO: Consider a more general-purpose solution for deciding whether or not the user wants to run in a "headless" mode.
|
||||
*/
|
||||
this.setReady();
|
||||
if (this.contextScreen || this.dbg) this.setReady();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -5197,8 +5201,8 @@ Video.init = function()
|
|||
var parmsVideo = Component.getComponentParms(eVideo);
|
||||
|
||||
var eCanvas = window.document.createElement("canvas");
|
||||
if (eCanvas === undefined) {
|
||||
eVideo.innerHTML = "<br/>Missing <canvas> support; try a new web browser.";
|
||||
if (eCanvas === undefined || !eCanvas.getContext) {
|
||||
eVideo.innerHTML = "<br/>Missing <canvas> support. Please try a newer web browser.";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue