mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
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:
parent
1615aa25fa
commit
7d9eee7b5b
|
@ -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': []
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue