Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1713] iOS: Implement DOMNode.textContent property for better compatibility with browser JS code

GitHub Issuen/a
TypeNew Feature
ResolutionWon't Fix
Resolution Date2011-11-05T18:24:10.000+0000
Affected Version/sRelease 1.5.0
Fix Version/sn/a
ReporterRalf Pfeiffer
AssigneeReggie Seagraves


DOM nodes in the Titanium Mobile iPhone and Android implementations have a 'text' property which pulls the text content of the node and any of its child nodes. While this is very handy, it's not compatible with WebKit and other browser DOM implementations, which complicates adapting code from Titanium Desktop or browser environments.

DOM level 3 specifies a textContent property for this, which is supported by most browsers. IE has an equivalent innerText property; existing cross-browser toolkits like jQuery check both so should start "just working" in this respect if textContent is added. (Of course any other remaining incompatibilities need to be fixed too!)


http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Node3-textContent"> http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#N...

Adding a compatible getter should be a very easy patch.


  1. Stephen Tramer 2011-04-15

    We only guarantee support for DOM 2 features.

  2. Stephen Tramer 2011-04-15

    Actually going to TBS this. Why not.

  3. Don Thorp 2011-11-05

    We're supporting DOM2, not browsers.

JSON Source