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

Use script tags to demarcate text components #1871

Closed
wants to merge 1 commit into from

Commits on Aug 3, 2014

  1. Use script tags to demarcate text components

    tl;dr: `<script></script>A<script></script>B` instead of `<span>A</span><span>B</span>`.
    
    Old:
    
    ![image](https://cloud.githubusercontent.com/assets/6820/3631177/af021294-0eb3-11e4-8b4a-d334cef48dea.png)
    
    New:
    
    ![image](https://cloud.githubusercontent.com/assets/6820/3631172/a74a7866-0eb3-11e4-9591-1320ba0c326a.png)
    
    This is nicer in that if you add styles on `span`, your text nodes now won't be affected. Similarly, the target of mouse events will now never be a ReactTextComponent span because the script elements aren't rendered at all.
    
    Test Plan: jest, and some simple browser sanity checking.
    sophiebits committed Aug 3, 2014
    Configuration menu
    Copy the full SHA
    30574ff View commit details
    Browse the repository at this point in the history