Side navigation
#8098 closed enhancement (fixed)
Opened January 31, 2011 04:23PM UTC
Closed February 02, 2011 12:02AM UTC
Last modified March 19, 2012 09:24PM UTC
Enhancement: Some `globalEval` optimizations
Reported by: | mathias | Owned by: | mathias |
---|---|---|---|
Priority: | low | Milestone: | 1.5.1 |
Component: | core | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Apparently pull requests do not suffice and enhancement requests need their own bug ticket, so here goes.
I’ve made this pull request on GitHub: https://github.com/jquery/jquery/pull/205
The changes I made are some minor optimizations to globalEval
, namely:
- Use the speedy
document.head
when it’s available inglobalEval
. - Don’t set
script.type = text/javascript
as it’s not needed — all browsers default totext/javascript
if thetype
attribute is omitted (and it’s valid HTML too).
Attachments (0)
Change History (4)
Changed January 31, 2011 04:33PM UTC by comment:1
owner: | → mathias |
---|---|
status: | new → assigned |
Changed January 31, 2011 06:47PM UTC by comment:2
component: | unfiled → core |
---|---|
milestone: | 1.next → 1.5.1 |
priority: | undecided → low |
Changed February 02, 2011 12:02AM UTC by comment:3
resolution: | → fixed |
---|---|
status: | assigned → closed |
Fixes #8098. Use the fast document.head when available. Don't set unneeded "script.type = text/javascript".
Changeset: 462bb1f66abf239492ee33c60feee3402fe64f77
Changed February 02, 2011 12:03AM UTC by comment:4
version: | git → 1.5 |
---|
Bullet 1 is a no-brainer, but I'd like to see a
reference cached, because this is used elsewhere as well.I definitely agree with bullet 2, without question. As far as I'm concerned setting the type is a waste of characters.