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

See f71dbab.