Skip to content

Commit

Permalink
Fix test to use correct code.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Oct 21, 2024
1 parent 11c9bf8 commit fad3d53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
" onload="resize_setting_highlight_example_frame(this)"></iframe>
<script>
function resize_setting_highlight_example_frame(obj) {
obj.style.height = obj.contentWindow.document.documentElement.scrollHeight + 'px';
// Not sure why can be 0!
if (obj.contentWindow.document.documentElement.scrollHeight > 0) {
obj.style.height = obj.contentWindow.document.documentElement.scrollHeight + 'px';
}
}
</script>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
" onload="resize_setting_highlight_example_frame(this)"></iframe>
<script>
function resize_setting_highlight_example_frame(obj) {
obj.style.height = obj.contentWindow.document.documentElement.scrollHeight + 'px';
// Not sure why can be 0!
if (obj.contentWindow.document.documentElement.scrollHeight > 0) {
obj.style.height = obj.contentWindow.document.documentElement.scrollHeight + 'px';
}
}
</script>
</div>

0 comments on commit fad3d53

Please sign in to comment.