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 ca714b3
Showing 1 changed file with 4 additions and 1 deletion.
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>

0 comments on commit ca714b3

Please sign in to comment.