Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #64274, comment 5


Ignore:
Timestamp:
11/21/2025 05:04:22 AM (11 months ago)
Author:
hbhalodia

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #64274, comment 5

    initial v1  
    11Yeah, it's bit confusing. I guess innerText returns the content that is usually seen in frontend, so for example if div has display: none; it would not return innerText from that div, but if we use textContent, it would return and also preserves the spaces and indentation.
    22
    3 So I am not sure as well what to use here, but Ideally if we do not need to preserve indentation, spaces we should go with innerText, instead of textContent but I am open to suggestions.
     3So I am not sure as well what to use here, but Ideally if we do not need to preserve indentation, spaces we should go with textContent, instead of innerText but I am open to suggestions.
    44
    55Cc: @westonruter @dmsnell