That's the expect behavior. get('text') just picks innerText or textContent,
depending on the browser.

Node.textContent from MDC -
Gets or sets the text content of a node and its descendants.
textContent returns the concatenation of the textContent attribute value of
every child node, excluding comments and processing instruction nodes. This
is an empty string if the node has no children.



On Mon, Nov 8, 2010 at 4:10 PM, doubleTap <[email protected]> wrote:

> Is it the correct behavior for someElement.get('text') to return the
> text of its child elements? For example, the following returns "Da
> kids aren't alright."
>
> <tr id="theySuckLive">
>  <td>
>    <b>Da kids aren't alright.</b>
>  </td>
> </tr>
>
> document.id('theySuckLive").text();

Reply via email to