Bug Tracker

Modify

Ticket #9522 (closed bug: wontfix)

Opened 2 years ago

Last modified 23 months ago

Cannot use .append() or .appendTo() with document fragments

Reported by: magentix@… Owned by:
Priority: low Milestone: 1.next
Component: manipulation Version: 1.6.1
Keywords: Cc:
Blocking: Blocked by:

Description

As the title states: trying to append() a document fragment OR trying to appendTo() onto a document fragment fails.

The fragment will not have any children in the example below:

var frag = document.createDocumentFragment(),
    elem = document.createElement('div');
	
/* Comment out 2 out of 3 to test each case separately */
	
//frag.appendChild(elem);
$(frag).append(elem);
//$(elem).appendTo(frag);
	
console.log(frag);

Change History

comment:1 Changed 2 years ago by dmethvin

  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to manipulation

fiddle:  http://jsfiddle.net/barfD/

barfD, lol.

comment:2 Changed 2 years ago by timmywil

Is that something we want to fix? Fragments are nodeType 11 and all manipulation is revolved around nodeType being 1.

comment:3 Changed 2 years ago by rwaldron

@dmethvin & @timmywil - I vote "invalid use case".

comment:4 Changed 23 months ago by addyosmani

  • Status changed from open to closed
  • Resolution set to wontfix

Adding a +1 to rwaldron's vote to mark this as an invalid use case. As timmywil appears to side with this not being behaviour that should be fixed, I'll be closing as wontfix.

If another member of the team wishes to change this resolution, please feel free to.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.