mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 20:47:44 +00:00
15 lines
348 B
HTML
15 lines
348 B
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<body>
|
||
|
<div id="source" style="width: 3ch"></div>
|
||
|
<div id="target" style="width: 0">
|
||
|
This is a test
|
||
|
</div>
|
||
|
<script>
|
||
|
document.getElementById("target").style.lineHeight =
|
||
|
document.defaultView
|
||
|
.getComputedStyle(document.getElementById("source"), "").width;
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|