borisyankov/DefinitelyTyped — pull request #2415 by falsandtru (2014-06-26 19:48:38+00:00)
Title: jQuery: Add `html` method overload signature

`html` method is, up to the latest from the first implementation, the internal behavior is redirected to `.empty().append()`. It is not written in the official documentation. However, the execution of a pattern that has not been written are the same as `append`, except that the argument is limited to one. In addition, it is a common use is expected. , Please allow pattern analogous to `append` for this.

http://code.jquery.com/jquery-1.1.js
```javascript
html: function( val ) {
return val == undefined ?
( this.length ? this[0].innerHTML : null ) :
this.empty().append( val );
},
````
http://code.jquery.com/jquery-1.4.2.js
http://code.jquery.com/jquery-1.7.2.js
http://code.jquery.com/jquery-1.11.1.js
http://code.jquery.com/jquery-2.1.1.js
```javascript
html: function( value ) {
return access( this, function( value ) {
var elem = this[ 0 ] || {},
i = 0,
l = this.length;

if ( value === undefined && elem.nodeType === 1 ) {
return elem.innerHTML;
}

// See if we can take a shortcut and just use innerHTML
if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {

value = value.replace( rxhtmlTag, "<$1>" );

try {
for ( ; i < l; i++ ) {
elem = this[ i ] || {};

// Remove element nodes and prevent memory leaks
if ( elem.nodeType === 1 ) {
jQuery.cleanData( getAll( elem, false ) );
elem.innerHTML = value;
}
}

elem = 0;

// If using innerHTML throws an exception, use the fallback method
} catch( e ) {}
}

if ( elem ) {
this.empty().append( value );
}
}, null, value, arguments.length );
},
```