Netscape 6, Part VI: Object-Oriented DOCJSLIB 1.2: createTheProperSubClass.js - Doc JavaScript
Netscape 6, Part VI: Object-Oriented DOCJSLIB 1.2
createTheProperSubClass.js
<!--
function createTheProperSubClass() {
var browserType = new browserSniffer();
if (browserType.ie4) {
this.className = "docjslibIE4SubClass";
}
else if (browserType.ie5) {
this.className = "docjslibIE5SubClass";
}
else if (browserType.ns4) {
this.className = "docjslibNS4SubClass";
}
else if (browserType.ns6) {
this.className = "docjslibNS6SubClass";
}
this.getTheProperSubClass = getTheProperSubClassMethod;
function getTheProperSubClassMethod() {
// example: return new docjslibIE5SubClass();
return eval('new ' + this.className + '()');
}
}
// -->
Next: Browser-independent superclass
Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: February 12, 2001
Revised: February 12, 2001
URL: https://www.webreference.com/js/column77/12.html