Opened 6 years ago
Closed 6 years ago
#4265 closed defect (bug) (fixed)
Update included prototype.js to 1.5.1
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.3 |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | javascript js prototype has-patch commit |
| Cc: |
Description
source:trunk/wp-includes/js/prototype.js is sitting at version 1.5. I'd like to propose we bump that to 1.5.1, the latest as per Prototype's site.
Attachments (3)
Change History (27)
I thought the idea was to make it available for plugin authors (not just for core admin stuff). The changes are pretty significant and unless we're planning on stripping it out, I don't see the logic in not updating...
Full changelog here, with a basic rundown in the improvements being:
*Incredible Selector speedup and full CSS3 support.
*Full JSON encoding and decoding support and options for improved security.
*Optimized Element#get/setStyle for cross-browser compatibility and speed.
*Various String method enhancements and fixes.
*The new Form#request method simplifies the common case of submitting a serialized form with XMLHttpRequest.
*Many form serialization fixes—if you had troubles before, now they’ve been squashed.
(Cribbed from the Prototype blog.
Freakin' WikiFormatting. That should've read:
- Incredible Selector speedup and full CSS3 support.
- Full JSON encoding and decoding support and options for improved security.
- Optimized Element#get/setStyle for cross-browser compatibility and speed.
- Various String method enhancements and fixes.
- The new Form#request method simplifies the common case of submitting a serialized form with XMLHttpRequest.
- Many form serialization fixes—if you had troubles before, now they’ve been squashed.
Ryan had indicated earlier that the plan was to keep Prototype in for plugin and theme authors' benefit. Is the plan now to remove Prototype and Scriptaculous once everything in admin is handled by jQuery?
comment:5
foolswisdom — 6 years ago
Preview ;-) Freakin' WikiFormatting. That should've read:
- Incredible Selector speedup and full CSS3 support.
- Full JSON encoding and decoding support and options for improved security.
- Optimized Element#get/setStyle for cross-browser compatibility and speed.
- Various String method enhancements and fixes.
- The new Form#request method simplifies the common case of submitting a serialized form with XMLHttpRequest.
- Many form serialization fixes—if you had troubles before, now they’ve been squashed.
- Owner changed from anonymous to rob1n
- Status changed from new to assigned
- Version 2.3 deleted
I'm okay with bumping the Prototype. It's backwards compatible and this is one of the pains in the butt that we're going to have to deal with, with maintaining included JS libraries.
Replying to matt:
I'd rather freeze it and replace anything that still uses it in core with jQuery.
I believe Prototype is still there for plugin authors. And it wouldn't hurt to speed up the JS in the core that *does* use Prototype.
- Keywords has-patch commit added
Patch updates Prototype from 1.5.0 to 1.5.1.
Bump the version in script-loader.php.
Also, update to scriptaculous 1.7.1 beta 2.
Test the hell out of list manipulation and AJAX.
comment:10
rob1n — 6 years ago
Okay.
comment:11
matt — 6 years ago
Good points, okay then.
comment:12
zamoose — 6 years ago
Okay, the diff I just attached should update Script.aculo.us and script-loader.php too. Please test.
comment:13
zamoose — 6 years ago
Rats. Bad TinyMCE bit in that .diff. I'll resubmit.
comment:14
zamoose — 6 years ago
There's also a sound.js included in the Script.aculo.us distro - probably ought to be included and added to script-loader.php. A .diff won't take care of that first part...
comment:15
rob1n — 6 years ago
It will if you svn add it, then svn diff it.
comment:16
zamoose — 6 years ago
Shoot, you're right - I shouldn't post diffs before I have my morning coffee.
Submitting new one now.
comment:17
rob1n — 6 years ago
Looks good.
comment:18
rob1n — 6 years ago
Why not just set the version to 1.5.1 instead of 1.5.1-0?
comment:19
zamoose — 6 years ago
rob1n:
I was attempting to follow the general style laid out previously. I've no affinity for numbering either way -- I was assuming whomever set the previous version knew what they were doing and thus blindly followed along. *grin*
Why must you persecute we lemmings?
comment:20
rob1n — 6 years ago
I was just wondering :).
I'll probably just take out the -0 when I commit, seems pointless to make + upload another patch just to get rid of that.
I'll commit this later today, after testing list manager and category stuff.
comment:21
zamoose — 6 years ago
Before you commit: looks like I didn't add the sound.js to script-loader.php. Should I add another diff, or do you just want to add it to the end of the scriptaculous-* section when you strip the -0's?
comment:22
rob1n — 6 years ago
I can just do it. No biggie.
comment:23
rob1n — 6 years ago
Tested:
- Listman (categories, posts, pages)
- Adding categories in the DBX widget, on-the-fly
- Autosave
- Dashboard (AJAX calls)
Everything worked fine. Commit?
comment:24
rob1n — 6 years ago
- Resolution set to fixed
- Status changed from assigned to closed

I'd rather freeze it and replace anything that still uses it in core with jQuery.