alexmingoia/jsx-transform

Option to specify custom identifier tags.

DylanPiercey opened this issue · 1 comments

Currently in JSX you are limited to valid JavaScript (lowercase) element names, otherwise a value is passed instead of a string.

It would be cool to add support for listing identifiers such as "!--" for comments.

<!-- text="Hi">
//-> DOM("!--", {text: "Hi"})

Instead of a syntax error.

Although I think a whitelist would be handy for third party virtual doms, ultimately the feature I'm looking for is html comments in jsx and perhaps it should be its own issue as the syntax would have to change a bit further (no attributes and ends with -->).
Let me know if I'm not making complete sense as I have typed this on a phone.

I think part of what you're looking for can be solved by setting the passUnknownTagsToFactory option. Possibly this too unknownTagsAsString.