fromHTML: Ensure the HTML element is attached to the document, related to #221