Improve ::dom() handling of partial/complete html.