Fractional scrollHeight?
I think I might have the solution:
var rect = element.getBoundingClientRect()
var scrollHeight = element.scrollHeight + (parseInt(rect.height) - rect.height)
var scrollWidth = element.scrollWidth + (parseInt(rect.width) - rect.width)