This repository was archived by the owner on Mar 13, 2018. It is now read-only.
File tree 2 files changed +15
-2
lines changed
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 696
696
} else {
697
697
if ( modNode && remNodes . length ) {
698
698
modNode . data += s ;
699
- cleanUpNodes ( remNodes ) ;
699
+ cleanupNodes ( remNodes ) ;
700
700
}
701
701
remNodes = [ ] ;
702
702
s = '' ;
Original file line number Diff line number Diff line change @@ -368,7 +368,6 @@ suite('Node', function() {
368
368
assert . equal ( span . firstChild . textContent , 'buzzquux' ) ;
369
369
assert . equal ( span . nextSibling , div . lastChild ) ;
370
370
assert . equal ( div . lastChild . textContent , 'bar\n' ) ;
371
-
372
371
} ) ;
373
372
374
373
test ( 'normalize with shadowroot' , function ( ) {
@@ -392,6 +391,20 @@ suite('Node', function() {
392
391
assert . equal ( sr . firstChild . nextSibling . textContent , 'quux' ) ;
393
392
} ) ;
394
393
394
+ test ( 'normalize - issue 441' , function ( ) {
395
+ var div = document . createElement ( 'div' ) ;
396
+ div . appendChild ( document . createTextNode ( 'a' ) ) ;
397
+ div . appendChild ( document . createTextNode ( 'b' ) ) ;
398
+ div . appendChild ( document . createElement ( 'span' ) ) ;
399
+ div . appendChild ( document . createTextNode ( 'c' ) ) ;
400
+ div . appendChild ( document . createTextNode ( 'd' ) ) ;
401
+
402
+ div . normalize ( ) ;
403
+
404
+ assert . equal ( div . textContent , 'abcd' ) ;
405
+ assert . equal ( div . childNodes . length , 3 ) ;
406
+ } ) ;
407
+
395
408
test ( 'appendChild last and first' , function ( ) {
396
409
var a = document . createElement ( 'a' ) ;
397
410
a . innerHTML = '<b></b>' ;
You can’t perform that action at this time.
0 commit comments