screenTop property emulation für mozilla
hi, ich habe eine webapp (leider nicht online) die häftigst IEspezifische properties und methoden verwendet - nun soll sie auch auf MOZ rennen (tja wenn ich es vorher gewusst hätte...).
ich habe nun folgende functions geschrieben um diese properties für MOZ zu emulieren...
//______________________ emulation ______________________________
//____clientWidth
if(typeof HTMLElement!="undefined" && !HTMLElement.prototype.clientWidth){
HTMLElement.prototype.clientWidth = function(){
this.innerWidth;
}
}
//____clientHeight
if(typeof HTMLElement!="undefined" && !HTMLElement.prototype.clientHeight){
HTMLElement.prototype.clientHeight = function(){
this.innerHeight;
}
}
//____screenTop - shit geht nicht
if(typeof HTMLElement!="undefined" && !HTMLElement.prototype.screenTop){
HTMLElement.prototype.screenTop = function(){
this.screenY;
}
}
//____screenLeft - shit geht nicht
if(typeof HTMLElement!="undefined" && !HTMLElement.prototype.screenLeft){
HTMLElement.prototype.screenLeft = function(){
this.screenX;
}
}
//______________________ emulation ______________________________
die ersten 2 gehen - die zweiten 2 nicht!
hat jemand eine idee??
mfg
AzRAeL
|