Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#11632 closed bug (invalid)

FUNCTION CREATESAFEFRAGMENT HAVE SOME REDUNDANT CODE

Reported by: snandy Owned by: snandy
Priority: low Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

Only document object has createElement method. so "if ( safeFrag.createElement )"in createSafeFragment is redundant.

Change History (3)

comment:1 Changed 8 years ago by sindresorhus

Owner: set to snandy
Priority: undecidedlow
Status: newpending

Can you link to some references? Line number?

There's probably a reason it's there. Try to remove it, run the testsuite in supported browsers, and report back if it still passes.

comment:2 Changed 8 years ago by Rick Waldron

Resolution: invalid
Status: pendingclosed

That's how we avoid the loop in modern browsers. In oldIE, there is a createElement method on DocumentFragment: http://jsfiddle.net/rwaldron/ZGgGs/

comment:3 Changed 8 years ago by snandy

thanks!

Note: See TracTickets for help on using tickets.