From 7d9eee7b5bdd1cd200dd38b5afa2683d7e009274 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Wed, 2 Oct 2013 15:47:34 +0100 Subject: [PATCH] Use element.textContent in ve.getDomElementSummary .text() returns empty for comment nodes, where textContent returns the contents of the comment node. Change-Id: I5e2798a6dba9d0f8fc13d5c0f78fe1fd255f1ebe --- modules/ve/ve.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/ve/ve.js b/modules/ve/ve.js index 566a13b863..9365984530 100644 --- a/modules/ve/ve.js +++ b/modules/ve/ve.js @@ -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': [] };