MCPcopy Index your code
hub / github.com/jquery/jquery / assertNameTerminatingCharsHandling

Function assertNameTerminatingCharsHandling

test/unit/manipulation.js:535–552  ·  view source on GitHub ↗
( method, character )

Source from the content-addressed store, hash-verified

533 }
534
535 function assertNameTerminatingCharsHandling( method, character ) {
536 var child,
537 codepoint = character.charCodeAt( 0 ).toString( 16 ).toUpperCase(),
538 description = "U+" + ( "000" + codepoint ).slice( -4 ) + " " + character,
539 nodeName = "div" + character + "this-will-be-discarded";
540
541 child = buildChild( method, "<" + nodeName + "></" + nodeName + ">" );
542 assert.equal( child.nodeName.toUpperCase(), "DIV",
543 method + "(): Paired tag name terminated by " + description );
544
545 child = buildChild( method, "<" + nodeName + ">" );
546 assert.equal( child.nodeName.toUpperCase(), "DIV",
547 method + "(): Unpaired open tag name terminated by " + description );
548
549 child = buildChild( method, "<" + nodeName + "/>" );
550 assert.equal( child.nodeName.toUpperCase(), "DIV",
551 method + "(): Self-closing tag name terminated by " + description );
552 }
553} );
554
555QUnit.test( "IE8 serialization bug", function( assert ) {

Callers 1

manipulation.jsFile · 0.85

Calls 1

buildChildFunction · 0.85

Tested by

no test coverage detected