Is there a reliable way to determine the width and height of the page content-block-inner, excluding the navbar and toolbar? This measurement can vary across different devices and operating systems.
I attempted to assign an id to the content-block-inner and then use $$('#test').height;
, but unfortunately, it did not work as expected.
<!-- Pages, because we need fixed-through navbar and toolbar, it has additional appropriate classes-->
<div class="pages navbar-through toolbar-through">
<!-- Page, data-page contains page name-->
<div data-page="index" class="page">
<!-- Scrollable page content-->
<div class="page-content">
<div class="content-block" style="margin: 0px; padding: 0px;" id="test">
<div class="content-block-inner" style="margin: 0px; padding: 0px;">
<div id="mypage" style="width:100%; height:80vh; margin: 0px; padding: 0px;">
</div>
</div>
<div class="toolbar" style="width:100%; margin: 0px; padding: 0px;" id="draw_toolbar">
<div class="toolbar-inner">
<i class="icon icon-bars" onclick="test()"></i>
<i class="icon icon-bars" onclick="test()"></i>
<i class="icon icon-bars" onclick="test()"></i>
<i class="icon icon-bars" onclick="test()"></i>
<i class="icon icon-bars" onclick="test()"></i>
</div>
</div>
</div>
</div>
</div>
</div>
The value returned by $$('#test').height
is:
function(){
return this[0]===window?window.innerHeight:this.length>0>parseFloat
}