Use element.textContent in ve.getDomElementSummary

.text() returns empty for comment nodes, where textContent returns
the contents of the comment node.

Change-Id: I5e2798a6dba9d0f8fc13d5c0f78fe1fd255f1ebe
This commit is contained in:
Ed Sanders 2013-10-02 15:47:34 +01:00
parent 1615aa25fa
commit 7d9eee7b5b

View file

@ -772,10 +772,9 @@
*/
ve.getDomElementSummary = function ( element, includeHtml ) {
var i,
$element = $( element ),
summary = {
'type': element.nodeName.toLowerCase(),
'text': $element.text(),
'text': element.textContent,
'attributes': {},
'children': []
};