.appendTo() should accept a document fragment as an argument (not just Element)

This commit is contained in:
Terry Mun
2018-09-11 13:29:18 +02:00
parent 664bd2ccfa
commit 9cd2d6f51a
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -3487,7 +3487,7 @@ interface JQuery<TElement = HTMLElement> extends Iterable<TElement> {
* @see \`{@link https://api.jquery.com/appendTo/ }\`
* @since 1.0
*/
appendTo(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray<Element> | JQuery): this;
appendTo(target: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray<Node> | JQuery): this;
/**
* Set one or more attributes for the set of matched elements.
*
+3
View File
@@ -5670,6 +5670,9 @@ function JQuery() {
// $ExpectType JQuery<HTMLElement>
$('span').appendTo($('p'));
// $ExpectType JQuery<HTMLElement>
$('span').appendTo(document.createDocumentFragment());
}
function insertAfter() {