Bug Tracker

Modify

Ticket #5293 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

createElement optimization should allow for tag pair as well as quick-closed tag

Reported by: kswedberg Owned by: flesler
Priority: major Milestone: 1.4
Component: core Version: 1.3.2
Keywords: Cc: kswedberg
Blocking: Blocked by:

Description

To take advantage of the document.createElement optimization when a tag pair such as '<span></span>' (as well as a self-closed tag) is passed into the jQuery() function, we can change line 35 of core.js (Rev. 6582) from this:

rsingleTag = /<(\w+)\s*\/?>$/,

to this:

rsingleTag = /<(\w+)\s*\/?>(?:<\/\1>)?$/,

Thanks, John, for the regex improvements!

Change History

comment:1 Changed 4 years ago by kswedberg

  • Type changed from bug to enhancement

comment:2 Changed 4 years ago by flesler

  • Cc kswedberg added
  • need changed from Review to Patch
  • Status changed from new to assigned
  • Owner set to flesler

I'm accepting the ticket so it won't get lost in the pile. I'll try to do this asap.

comment:3 Changed 4 years ago by john

  • Status changed from assigned to closed
  • Resolution set to fixed

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.