[TIMOB-1713] iOS: Implement DOMNode.textContent property for better compatibility with browser JS code
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Trivial |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2011-11-05T18:24:10.000+0000 |
Affected Version/s | Release 1.5.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Ralf Pfeiffer |
Assignee | Reggie Seagraves |
Created | 2011-04-15T03:00:15.000+0000 |
Updated | 2012-03-10T15:01:09.000+0000 |
Description
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!)
https://developer.mozilla.org/En/DOM/Node.textContent">https://developer.mozilla.org/En/DOM/Node.textContent
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.
We only guarantee support for DOM 2 features.
Actually going to TBS this. Why not.
We're supporting DOM2, not browsers.