demo/dist/demo.js
function getMenuSize(tab) {
	    var clone = tab.cloneNode(true);
	    clone.style.position = 'absolute';
	    clone.style.opacity = 0;
	    clone.removeAttribute('hidden'); // Append to parent so we get the "real" size

	    tab.parentNode.appendChild(clone); // Get the sizes before we remove

	    var width = clone.scrollWidth;
	    var height = clone.scrollHeight; // Remove from the DOM

	    removeElement(clone);
	    return {
	      width: width,
	      height: height
	    };
	  }
function getMenuSize(tab) {
	    var clone = tab.cloneNode(true);
	    clone.style.position = 'absolute';
	    clone.style.opacity = 0;
	    clone.removeAttribute('hidden'); // Append to parent so we get the "real" size

	    tab.parentNode.appendChild(clone); // Get the sizes before we remove

	    var width = clone.scrollWidth;
	    var height = clone.scrollHeight; // Remove from the DOM

	    removeElement(clone);
	    return {
	      width: width,
	      height: height
	    };
	  }
function getMenuSize ( tab ) { var clone = tab . cloneNode ( true ) ; clone . style . position = 'absolute' ; clone . style . opacity = 0 ; clone . removeAttribute ( 'hidden' ) ; // Append to parent so we get the "real" size tab . parentNode . appendChild ( clone ) ; // Get the sizes before we remove var width = clone . scrollWidth ; var height = clone . scrollHeight ; // Remove from the DOM removeElement ( clone ) ; return { width : width , height : height } ; }
Get the natural size of a menu panel
Get the natural size of a menu panel