mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-26 11:12:19 +08:00
Merge pull request #2308 from lijunle/jQuery-parseHTML
Fix jQuery.parseHTML does not recognize document
This commit is contained in:
@@ -3114,6 +3114,9 @@ function test_parseHTML() {
|
||||
$( "<ol></ol>" )
|
||||
.append( nodeNames.join( "" ) )
|
||||
.appendTo( $log );
|
||||
|
||||
// parse HTML with all parameters
|
||||
$.parseHTML( str, document, true );
|
||||
}
|
||||
|
||||
// http://api.jquery.com/jQuery.parseJSON/
|
||||
|
||||
Vendored
+9
@@ -1252,6 +1252,15 @@ interface JQueryStatic {
|
||||
* @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
|
||||
*/
|
||||
parseHTML(data: string, context?: HTMLElement, keepScripts?: boolean): any[];
|
||||
|
||||
/**
|
||||
* Parses a string into an array of DOM nodes.
|
||||
*
|
||||
* @param data HTML string to be parsed
|
||||
* @param context DOM element to serve as the context in which the HTML fragment will be created
|
||||
* @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
|
||||
*/
|
||||
parseHTML(data: string, context?: Document, keepScripts?: boolean): any[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user