This project is archived and is in readonly mode.

#466 ✓invalid

Cross browser method for innerText/textContent

Reported by Kalle | November 12th, 2008 @ 11:50 PM | in 1.2.3

So like the Element.html method I would like to request a unified method to when you're dealing with innerText.

innerText is like innerHTML except for it escapes the HTML so it doesn't get parsed. In Mozilla this property is called "textContent" and in any other browsers from what my small research brought me then IE, Opera and Safari supports innerText.

Comments and changes to this ticket

  • Tom Occhino

    Tom Occhino November 13th, 2008 @ 03:00 AM

    • Assigned user changed from “Valerio” to “Tom Occhino”
    • Milestone changed from 2.0 to 1.2.3
    • State changed from “new” to “invalid”
    $('element').set('text', 'some text');

    been in there for a while now...

  • Kalle

    Kalle November 13th, 2008 @ 03:52 PM

    Thanks for the quick reply Tom, I must have skimmed it over when reading the docs :)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket