Better detection of Web Wizard APIs, close #2
This commit is contained in:
parent
a2c366a81a
commit
523d301d1e
26
console.js
26
console.js
|
@ -141,13 +141,6 @@ window.onload = function () {
|
|||
runButton.onclick = run;
|
||||
clearButton.onclick = console.clear;
|
||||
|
||||
// Try to detect the wizard extensions.
|
||||
if (typeof window.external === 'object' && typeof window.external.SetWizardButtons === 'unknown') {
|
||||
window.external.SetHeaderText('JavaScript Console', "Explore this wizard's JavaScript environment.");
|
||||
// Enable the back button
|
||||
window.external.SetWizardButtons(1, 0, 0);
|
||||
}
|
||||
|
||||
if (/MSIE 7.0/.test(navigator.userAgent)) {
|
||||
/*
|
||||
* For some reason, IE 7 messes up the textarea's width and height
|
||||
|
@ -161,7 +154,18 @@ window.onload = function () {
|
|||
}
|
||||
}
|
||||
|
||||
// An onback function is required by the web wizard specification
|
||||
window.onback = function () {
|
||||
window.external.FinalBack();
|
||||
}
|
||||
// Try to detect the wizard extensions.
|
||||
if (typeof window.external === 'object') {
|
||||
if (typeof window.external.SetHeaderText === 'unknown')
|
||||
window.external.SetHeaderText('JavaScript Console', "Explore this wizard's JavaScript environment.");
|
||||
|
||||
if (typeof window.external.SetWizardButtons === 'unknown')
|
||||
window.external.SetWizardButtons(1, 0, 0);
|
||||
|
||||
if (typeof window.external.FinalBack === 'unknown') {
|
||||
// An onback function is required by the web wizard specification
|
||||
window.onback = function () {
|
||||
window.external.FinalBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue