Update DOM properties when attributes change.