[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: RE: offsetHeight property support -- almost there
From: "David Joham" <djoham () criadvantage ! com>
Date: 2001-07-19 5:45:07
[Download RAW message or body]
Hi Dirk et. al.
If you guys could work your magic one more time, I think we're really
close...
It looks like we have a race condition in the current implementation of
offsetHeight. It works, but only if you let Konqueror "think" about it
for a while. The following code demonstrates the problem:
btw: what happened to innerHTML yesterday? It's slow as heck now. Makes
debugging a real pain in this case. If you go back to the menus at
http://www.kimanddavidforever.org/jsmenus/LoadMe.html and press the show
debug button, konqi takes 100% CPU and drags for a *very* long time. Any
thoughts?
<html>
<body>
<form>
<input type="button" onclick="go()" value="Get the height!">
</form>
</body>
</html>
<script language="javascript">
function go() {
var newDiv = document.createElement("DIV");
newDiv.innerHTML =
"hello<br>hello<br>hello<br>hello<br>hello<br>hello<br>hello<br>hello<br
>";
newDiv.id = "newDiv";
document.body.appendChild (newDiv);
//this alert will return 0
alert("doesn't work - offsetHeight is " +
document.getElementById("newDiv").offsetHeight);
//this alert will return the correct value
alert("will work fine -- offsetHeight is " +
document.getElementById("newDiv").offsetHeight);
}
</script>
Best regards,
David
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic