Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move isAttributeNameSafe to DOMProperty #11802

Merged
merged 1 commit into from Dec 8, 2017

Conversation

aweary
Copy link
Contributor

@aweary aweary commented Dec 7, 2017

Deduping isAttributeNameSafe. DOMProperty feels like the best place for isAttributeNameSafe since:

  • It already depends on the regexes it exports
  • It contains other attribute logic like `shouldSetAttribute

warning(false, 'Invalid attribute name: `%s`', attributeName);
}
return false;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to use a Set?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a good place to use it, but only with a benchmark run confirming it :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, haha

@gaearon
Copy link
Collaborator

gaearon commented Dec 8, 2017

No bundle size changes?

@gaearon
Copy link
Collaborator

gaearon commented Dec 8, 2017

Nvm both server and client use DOMProperty anyway.

@aweary aweary merged commit 6e258c1 into facebook:master Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants