Normalize view and detail properties
Don't fail if target.ownerDocument is null

See f71dbab.
Let early returns do their thing
Merge pull request #813 from spicyj/e-view-detail

Normalize view and detail properties