Auto increase offset by 32px when admin bar present by salcode · Pull Request #5 · WebDevStudios/Hash-Link-Scroll-Offset
Originally my solution used is_admin_bar_showing()
I liked the check for $('#wpadminbar') better because then the logic for changing the offset is completely client side.
My thought was it lent itself better to dealing with cached output. Reflecting on this, I'm not sure there is a situation where the localized hlso_data would be cached but the presence or absence of the $('#wpadminbar') would not. Based on this, setting the admin bar state in hlso_data server side should work just as well.
Are there any cases where the #wpadminbar would be present but hidden? (in which case, you'd need to check for the presence and check the value of the CSS display property). I don't think this is a situation that arises.