Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: sstephenson/prototype
head fork: sstephenson/prototype
Checking mergeability… Don't worry, you can still create the pull request.
Commits on Dec 10, 2010
@pdeffendol pdeffendol Element.absolutize should save existing position style so that relati…
…vize restores it.
Commits on Oct 31, 2011
@rlineweaver rlineweaver avoiding infinite loop in String#gsub when there is a zero length match 075625c
Commits on Dec 06, 2011
@dvv dvv documentation typo fixed. hopefully the last 9d920de
Commits on Feb 23, 2012
@leafo leafo Fixed incorrect documentation. a8613ef
Commits on Jun 27, 2012
@victor-homyakov victor-homyakov Unused var declaration and initialization is removed a3cac7c
@victor-homyakov victor-homyakov Removed `Element.extend` from `_element` accordingly to comment "use …
…it internally as `_element` without having to extend the node".

Restored `selector.match` in `findElement` because it may rely on `this`.
Fixed typo in "IE-proprietarty".
Commits on Jul 13, 2012
@victor-homyakov victor-homyakov Wrong PDoc for Array#some and Array#every b6897b4
Commits on Aug 09, 2012
@victor-homyakov victor-homyakov Fixed typo in PDoc 6d62c44
Commits on Aug 27, 2012
@jochenberger jochenberger add a test to ensure that the ObjectRange.each interator function in …
…passed the index parameter
@jochenberger jochenberger fix index value not being passed to ObjectRange.each's iterator function 2729bcb
@jochenberger jochenberger add a test to ensure that the Hash.each interator function in passed …
…the index parameter
@jochenberger jochenberger fix index value not being passed to Hash.each's iterator function 8a0cd1e
@savetheclocktower savetheclocktower Merge pull request #59 from jochenberger/fix-objectrange-each
Ensure index is passed to the iterator in `ObjectRange#each`.
@savetheclocktower savetheclocktower Merge pull request #60 from jochenberger/fix-hash-each
Ensure index is passed to the iterator in `Hash#each`.
@savetheclocktower savetheclocktower Merge pull request #56 from victor-homyakov/patch-16
Fix typo in PDoc.
@savetheclocktower savetheclocktower Merge pull request #55 from victor-homyakov/patch-15
Fix PDoc for `Array#some` and `Array#every`.
@savetheclocktower savetheclocktower Merge pull request #44 from leafo/patch-1
Fix incorrect documentation for `Event#findElement`.
@savetheclocktower savetheclocktower Merge pull request #53 from victor-homyakov/patch-13
Remove redundant variable declaration.
@savetheclocktower savetheclocktower Fix PDoc errors. 08112b7
@savetheclocktower savetheclocktower Work around Opera issue in `createResponder`; simplify access to elem…
…ents in `Event.cache`.
@savetheclocktower savetheclocktower Merge branch 'master' of c8a6942
@savetheclocktower savetheclocktower Merge pull request #27 from rlineweaver/master
Avoid an infinite loop in `String#gsub` when there is a zero-length match.
Commits on Aug 28, 2012
@victor-homyakov victor-homyakov Short-circuit for Element#down() without arguments
Prevent selecting ALL descendants with `'*', element)` when invoking Element#down() without arguments
@savetheclocktower savetheclocktower Merge pull request #54 from victor-homyakov/patch-14
Remove `Element.extend` call from `_element`.
Commits on Aug 31, 2012
@savetheclocktower savetheclocktower Optimize performance of `Event.stopObserving` by returning early when…
… called on an element with no registered observers. [Victor Homyakov]
Commits on Sep 01, 2012
@savetheclocktower savetheclocktower Merge pull request #11 from fragility/master
Store position setting when calling `Element.absolutize`.
@savetheclocktower savetheclocktower Fix typo. 1cd72a9
@savetheclocktower savetheclocktower Document the `$break` faux-keyword for `Enumerable` methods. 4577941
@savetheclocktower savetheclocktower Merge pull request #61 from victor-homyakov/patch-17
Optimize the case when `Element.down` is called without any arguments.
@savetheclocktower savetheclocktower Merge pull request #35 from dvv/patch-2
Add missing newline in documentation for `Element.siblings`.
@savetheclocktower savetheclocktower Ensure we set `document.loaded` to `true` (and fire `dom:loaded`) whe…
…n Prototype is loaded asynchronously after DOMContentLoaded.
Commits on Sep 20, 2012
@npup npup Add test and changes for serializing forms with multiple select to a …
…string to work again.

Signed-off-by: Jorgen Rydenius <>
Jorgen Rydenius Fixed bug #1384 for the hash accumulator + test case. e6c89d2
Commits on Sep 21, 2012
Jorgen Rydenius Replacing '%20' with '+' in for the keys too in the form to string se…
Commits on Sep 24, 2012
@victor-homyakov victor-homyakov Prevent IE leaks
Without fix:

 - when `ELEMENT_CACHE` is not empty (e.g. `SPAN` was created with `new Element('span'))`, IE will leak memory for `DIV` and `ELEMENT_CACHE` after page unload.
 - when `ELEMENT_CACHE` is empty, `DIV` is cleaned correctly without any additional actions.

Problem detected and fix tested in sIEve-0.0.8.
Commits on Sep 25, 2012
@victor-homyakov victor-homyakov DIV cannot be cleared until page unload 37e6c11
Commits on Sep 27, 2012
Jorgen Rydenius Fix for #1339, regression that setOpacity IE regression in 1.7.1 when…
… setting opacity on an element before it was added to DOM. Also fixed some related tests.
@savetheclocktower savetheclocktower Merge pull request #70 from rydenius/1339-hasLayout_IE-fix
Fix IE regression in `Element#setOpacity`. [#1339 state:resolved]
@savetheclocktower savetheclocktower Merge pull request #69 from victor-homyakov/patch-22
Clear element creation cache in IE on page unload.
@savetheclocktower savetheclocktower Merge pull request #66 from rydenius/1384-form-serialize-fix
Fix regression in `Form.serialize` when handling `<select multiple>` elements. [#1384 state:resolved]
Commits on Oct 03, 2012
@victor-homyakov victor-homyakov Fixed PDoc for toQueryString() 7f9dc59
Commits on Oct 22, 2012
@victor-homyakov victor-homyakov `toQueryPair()`: `value` is already defined 6336c45
Commits on Oct 23, 2012
@victor-homyakov victor-homyakov Merged nested if() into single expression 3edad4f
Commits on Oct 26, 2012
@sdumitriu sdumitriu Issue #1431: writeAttribute('checked') fails to write the 'checked' a…
…ttribute, writes an 'undefined' attribute instead
Commits on Nov 02, 2012
@savetheclocktower savetheclocktower Merge pull request #80 from sdumitriu/issue-1431
Fix an issue where `writeAttribute` tries to set an attribute named `undefined` in certain cases. [#1431 state:resolved]
@savetheclocktower savetheclocktower Merge pull request #78 from victor-homyakov/patch-27
Merged nested if() into single expression
@savetheclocktower savetheclocktower Merge pull request #77 from victor-homyakov/patch-26
`toQueryPair()`: `value` is already defined
@savetheclocktower savetheclocktower Merge pull request #74 from victor-homyakov/patch-24
Fix PDoc for `toQueryString`.
Commits on Dec 25, 2012
@victor-homyakov victor-homyakov viewportOffset: extend forElement (it's used twice)
`forElement` was used twice in `viewportOffset`:
1. at line 1147 as `var element = $(forElement);`
2. at line 1156 as `element = forElement;`
This leads to error when `forElement` is string: `Element.viewportOffset('id')`
Commits on Dec 26, 2012
@savetheclocktower savetheclocktower Merge pull request #87 from victor-homyakov/patch-31
Prevent error in `Element.viewportOffset` when string is passed as first argument.
Commits on Dec 27, 2012
@victor-homyakov victor-homyakov Possibility to remove X-* headers for CORS request
`setRequestHeaders()` unconditionally adds specific headers to any request.

This patch gives possibility to remove these headers in order to allow simple CORS request.

Based on and
Commits on Dec 28, 2012
@savetheclocktower savetheclocktower Merge pull request #88 from victor-homyakov/patch-32
Don’t send Ajax headers whose values are `null`.

This allows end users to opt out of `X-Requested-With` and `X-Prototype-Version` by explicitly setting them to `null`. (Use case: making a CORS Ajax request without a preflight request.)
@jwestbrook jwestbrook IE8 fix for the opacity check
IE8 fails to set the match variable which throws a javascript variable
@savetheclocktower savetheclocktower Merge pull request #90 from jwestbrook/IE8Opacityfix
Prevent exception in IE when calling `Element.getOpacity`.
Commits on Jan 24, 2013
@victor-homyakov victor-homyakov Firefox 18+ supports String#startsWith, String#endsWith fa1f899
Commits on Jan 26, 2013
@victor-homyakov victor-homyakov Optional position argument
Added optional position argument to `String#startsWith`, `String#endsWith`, as described in and
Documented new arguments and examples.
@victor-homyakov victor-homyakov Updated unit tests bc3ac95
Commits on Feb 03, 2013
@kir kir Bugfix in toQueryParams (didn't decode '+' correctly) f2a1136
Commits on Mar 26, 2013
@savetheclocktower savetheclocktower Add documentation example for `Element#clone.` beb5dbc
@savetheclocktower savetheclocktower Merge pull request #96 from victor-homyakov/patch-33
Use native `String#startsWith` and `String#endsWith` if present. Turn existing implementation into a true polyfill.
@savetheclocktower savetheclocktower Merge branch 'master' of 9e058b4
@savetheclocktower savetheclocktower Add polyfill information to documentation for `String#startsWith` and…
… `String#endsWith`.
@savetheclocktower savetheclocktower Merge pull request #98 from kir/master
Ensure that '+' is correctly deserialized in `String#toQueryParams`.
Commits on Apr 04, 2013
@savetheclocktower savetheclocktower Fix an issue with a capability check causing an error in IE 10. faa0ba9
@savetheclocktower savetheclocktower Merge branch 'master' of e3d5200
Commits on Jan 18, 2014
@jwestbrook jwestbrook Fixes scollTop property that is deprecated on body
Chrome 32 deprecates document.body.scrollTop, should use
document.documentElement.scrollTop instead. Polyfill describe here
Commits on Jan 19, 2014
Jason Westbrook Style and reduce redundant code f4cb26c
Commits on Jan 20, 2014
@savetheclocktower savetheclocktower Merge pull request #110 from jwestbrook/cumulativeScrollOffset-fix
Fix use of `scrollTop` property in `Element.cumulativeScrollOffset`.
Commits on Feb 05, 2014
@savetheclocktower savetheclocktower Fix failing string test in Chrome. 810f0f6
Commits on Mar 27, 2014
@savetheclocktower savetheclocktower Update Sizzle to latest stable version. a9ecf65
@savetheclocktower savetheclocktower Update include point for latest version of Sizzle. cb02575
@savetheclocktower savetheclocktower Remove a failing test.
(Sizzle doesn't seem to support this anymore, which is fine with me because it's a ridiculous selector.)
@savetheclocktower savetheclocktower Change failing tests.
One of these tests presumably tests comma handling — whether we do the right thing when the space is before the comma, or when there end up being duplicate commas — and this is not something we handled before, so if this is a newly-failing test it's because Sizzle used to handle this and now does not. That's fine with me.

The other one appears to be a disagreement over whether `:enabled` should match `input[type=hidden]`, and Sizzle apparently says it does, and I'm OK with that, too.
Commits on Mar 28, 2014
@savetheclocktower savetheclocktower Fix issue in old versions of IE with checkbox reading.
Some of the tests added in 4a22a5 apparently never worked in old IE. I added a capability check for the buggy behavior and a new path for IE.

Also, changed a `getAttribute` in a test to `readAttribute` — otherwise the test would never pass in IE 6-7, since `getAttribute` doesn't work right.
@savetheclocktower savetheclocktower Add a `test:server` rake task.
For IE, I find it far easier to start the test server on my dev machine, then use my IE machine to visit the test pages manually. For that I need a task that runs the server indefinitely.

At some point I'll add a page that does nothing but list the tests for convenience.
Commits on Apr 07, 2014
@savetheclocktower savetheclocktower Fix a capability check that raised an exception in IE8. e87f4b7
@savetheclocktower savetheclocktower Bypass a capability check in newer IEs to avoid a "this page uses Jav…
…a" dialog.
Commits on Apr 19, 2014
@savetheclocktower savetheclocktower Remove old version of Sizzle in source tree.
The distribution is built with the version in the Sizzle submodule. It's unclear to me that these files were _ever_ used for building a distributable prototype.js.

If there are good reasons to keep them around, I'm happy to hear them. Otherwise they just create confusion.
@savetheclocktower savetheclocktower Bump version number. d9411e5