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.)
`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 http://stackoverflow.com/questions/13814739/prototype-ajax-request-being-sent-as-options-rather-than-get-results-in-501-err and https://prototype.lighthouseapp.com/projects/8886/tickets/1590-ability-to-remove-headers-in-ajaxrequestsetrequestheaders-for-cors
`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')`
…ttribute, writes an 'undefined' attribute instead
… setting opacity on an element before it was added to DOM. Also fixed some related tests.
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.
…string to work again. Signed-off-by: Jorgen Rydenius <email@example.com>
…n Prototype is loaded asynchronously after DOMContentLoaded.