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

Some HTML Attributes are not being mapped to camelCase #151

Closed
tylerisvivid opened this issue Aug 9, 2022 · 1 comment · Fixed by #152
Closed

Some HTML Attributes are not being mapped to camelCase #151

tylerisvivid opened this issue Aug 9, 2022 · 1 comment · Fixed by #152

Comments

@tylerisvivid
Copy link

tylerisvivid commented Aug 9, 2022

Hello,

I recently ran into an issue with my project where some HTML attributes are not contained in the src/attribute.json file and are not converted into camelCase as a result of the exclusion. I do not see a security concern that would cause these properties to be excluded and would like to know if the exclusions were intentional, and if anyone is willing to share the reasoning behind the exclusions before I add them in my code. The HTML properties in question are:

  1. itemprop (itemProp) - https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/itemprop
  2. itemscope (itemScope) - https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/itemscope
  3. itemtype (itemType) - https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/itemtype

I included links to show that all 3 of these properties are valid HTML global attributes. Please let me know if I am overlooking something, or if there is an underlying reason these properties have been excluded from mapping in this project.

Thank you for your time and support on this project :) I would be willing to submit a PR with the new attributes if you agree they should be present in this project.

Have a nice afternoon.

@pveyes
Copy link
Owner

pveyes commented Aug 11, 2022

Hi @tylerisvivid thanks for raising this issue

the attribute mapping was recently refactored to reduce bundle size, seems like the trick used to optimize bundle size doesn't work on item* attributes. I've created the PR to fix but if you have a more thorough test case it would be awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants