Modify ↓
Ticket #5293 (closed enhancement: fixed)
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: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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.
