To avoid content jump padding is replaced with margin on "<html>" element, closes #125
function _checkIfClose is now public, to allow overriding
0.9.8