Releases: madrobby/zepto
Releases · madrobby/zepto
Zepto.js 1.2.0
On top of all the bug fixes found in v1.1.7, this release also brings new features and some slightly backwards-incompatible changes made to ensure better parity with jQuery.
Large changes:
- Eliminate
__proto__use from codebase. - Enable AMD-compatible module output.
Zeptoand$are still exported to global namespace, even in the case of module loader, to keep compatibility with plugins.
New functionality:
- Add
$.noop - Add
fn.removeProp() - Add
$.isNumeric() - Add
dataFilterajax option - Provide
$.data()&$.hasData()in optional "data" module - Add Firefox OS detection
jQuery compatibility:
- Stop falling back to reading properties in
fn.attr() fn.attr()now returnsundefinedfor non-existing properties instead ofnull- Add document fragment/shadow DOM support
Zepto.js 1.1.7
DOM:
- Fix
fn.closest()on collections of multiple elements text()returns text from all matching selectors- Fix
offset()on documentElement - Use the standard API for CSS selector matches
append()now accepts array of DOM nodes- Add multi-window support for embedded scripts
- Fix
css()batch setting on non-existing element - Convert null/undefined into "" in
fn.val()for jQuery compatibility - Improve detection of array-like objects
Ajax:
- Fix appending ajax params to URLs that have a hash component
- Add ajax support for receiving binary data
- Sufficiently randomize JSONP callback names
- Fix assigning query params from
datawith explicit JSONP
Cross-browser:
- Avoid IE10 error by checking if element is in the DOM before calling
getBoundingClientRect - Added support for pseudo-elements in IE
getComputedStyleshim - Fix use of ajax
xhrFieldson Android 2.3 and Windows Mobile - Fx: avoid using vendor prefixes if unprefixed is supported
Misc.:
- Fix dasherize bug in fx module
- Fix
swipeevent of touch module - Avoid exception in
doubleTap - Accept function as data for
onevent handler - Populate
event.timeStampif it's 0 or missing
Zepto.js 1.1.6
- Fix
crossDomaindetection in$.ajaxwith regard to IE's treatment of port numbers
Zepto.js 1.1.5
Many serialization improvements:
- Don't serialize form fields without a
nameattribute - Don't try to serialize
<input type=file> - Fix serializing
<select multiple>values - Fix
serialize()/serializeArray()on empty Zepto collections - Serialize null values as empty strings in
$.param() - Support functions as values in
$.param() - Only deserialize number from
data-*attributes if that doesn't change its string representation
Other fixes:
- Improve detection of whether an
$.ajaxrequest iscrossDomainor not - Fix
find(falsey)to return an empty Zepto collection instead of an empty Array - Fix
css()on empty Zepto collection causing exceptions when "ie" module is not included - Ensure that
$.animatecompletion callback doesn't fire prematurely if the animation is configured with adelay - Actually
focus()&blur()elements when these events are manually triggered - Fix installing auto-cancelling event handlers with shorthands such as
submit(false),click(false) - Prevent
removeClass/addClassfrom affecting window objects - Enable
removeAttrto remove space separated list - Ensure recognition of Safari on Windows
Zepto.js 1.1.4
- Detect IE 11, Windows Phone, Safari on OS X
.find()with falsy values now returns an empty array- Fix how
.attr('value')and.val()interact on<input>(#939) - Have
.text()accept a function argument - Make
.text(undefined)assign an empty string - Do not eval
<script>tags if parent element is not in the DOM - Second argument to
.attr/prop/data()is always a setter, even ifundefined $.proxy()now accepts additional arguments$.ajax()uses HTTP cache-busting parameter fordataType: jsonp/scriptby default- Fix
$.containsand related features on Firefox 4 – 8.0
Zepto 1.1.3
- Fix automatic parsing of JSON responses in
$.get/post - Don't falsely detect requests to URLs such as
/foo=?a=bto be JSONP requests; the=is part of the request path in this case - Use native
Array.isArrayif available - Update to Uglify v2, saving ~1.6 kB in minified version
✨ 🌟 Download Zepto.js 🌟 ✨
Zepto 1.1.2
- Enabled
xhr.setRequestHeader()inbeforeSendAjax handler
Zepto 1.1.1
- Make sure to properly patch the Zepto object in IE, not any global
$object.
Zepto 1.1
Notable changes
- IE10+ support
- Huge speed optimizations for simple CSS selectors (classname, ID) and DOM element creation
- Provide
$.Callbacksand$.Deferredin optional modules - Removed
fxanddetectmodules from default build
Download Zepto.js:
zepto.js– 53.2k uncompressed with commentszepto.min.js– 9.2k when gzipped
Ajax
- New supported
$.ajax()options:xhrFieldsmimeTypejsonpCallbackusername&password
- Promise interface supported when loading the optional "callbacks" and "deferred" modules:
xhr.done(function(data, status, xhr){ ... })xhr.fail(function(xhr, errorType, error){ ... })xhr.always(function(){ ... })
- Enable mutating Ajax settings in the
beforeSendcallback - Fix JSONP callbacks for errored responses on Android
- Ensure consistent
Acceptrequest HTTP header across browsers - Fix
$.param()for jQuery compatibility when handling complex nested objects - Support IIS JavaScript MIME type
- Pass "abort" and "timeout" status to global
ajaxErrorevent handlers
Event
- Provide
isDefaultPrevented(),stopImmediatePropagation(), and related methods for all events - Support the
dataargument in.bind(),.on(), and.one() - Support CSS selector argument in
.one()for event delegation - Support
.on('ready')as an alias for.ready() - Enable event handlers on plain old JS objects
- Many fixes related to event delegation
Data
- Cleanup
.data()values on DOM element removal with.remove/empty() .data()now assumes that numbers that begin with zeroes are strings.removeData()(no argument) now removes all data on the element- Enable reading
data-*attributes that have underscores in the name
Misc.
- Support simple DOM property names in
.prop(name)such asfor,class,readonly… - Implement the
.scrollLeft([value])method - Support setting
.scrollTop(value) - Fix
$(document).width/height() - Support fetching multiple CSS values via array in
.css(['prop1', 'prop2', ...]) - Support setting CSS transition delay via
delayoption for.animate() - Ensure that
.animate()callback always fires
Zepto 1.0.0
Party like it's one-oh!
Notable changes
- Zepto is now compatible with Twitter Bootstrap
- Portable, completely new node.js-based build system
- Fully automated tests with PhantomJS and Travis CI
- Removed
touchmodule from default distribution
New features
$.fn.filter(function(index){ ... })$.fn.contents()$.fn.wrapInner()$.fn.scrollTop()$.contains()$.fn.has()$.fn.position()$.fn.offsetParent()$.parseJSON()$.camelCase()$.isWindow()$.grep()(interface toArray.filter)- Support
$(html, attributes)syntax for element creation - Emulate
mouseenterandmouseleaveevents - Bootstrap compat: support
$.fn.offset(coordinates) - Bootstrap compat: implement
$.fn.detach() - Add support for Ajax
cache: falseoption - Prevent scrolling when horizontal swipe events are detected
cancelTouchfor tap eventsprevandnextnow support an optional selector argument$.fn.findand$.fn.closestnow support Zepto objects as arguments- Enable deep copy via
$.extend(true, target, source) - Enable nested structures for
$.fn.wrap()and$.fn.wrapAll() - Enable function arguments for
$.fn.wrap()and$.fn.wrapInner() - Support number, boolean, JSON types in data attributes
- Support manipulating classnames on SVG elements
- Enable named durations for
animate, e.g.slow. - Support
timing-functionforanimate - Support event properties passed to
$.fn.trigger()or$.Event() - Selector module: support child
> *queries - Add detect support for mobile Chrome browser
- Add
$.os.phoneand$.os.tablet(booleans) - Detect Firefox mobile, Playbooks and BB10
Fixes
- Fix passing null selector to
onoroff - Fixed bug where self-closing html tags would act as open tags
- Fix
valfor multiple select - Fix various touch and gesture bugs.
- Corrected parameters of
loadsuccess callback to match jQuery. - Fix
csswith 0 values and falsy values - Fix a
cssperformance issues with string values - Fix
$.ajaxJSONPwhen invoked directly - Fix
animatewith 0 durations. - Fix
toggleandfadeTogglefor multiple elements. - Fix ajax
$.fn.loadbehavior with selector - Make
attr(name, null)unset attribute - Fix
animatein Firefox - Fix
animatefor elements just added to DOM - Fix an escaping issue with
$.param - Respect
traditional: trueoption in$.ajax - Fix
focus&blurevent delegation and enable unbind - Simple wrapping for any object passed to
$() - Enable
childrenmethod for XML documents - Don't eval
<script>content whensrcis present - Support
processDataoption for$.ajax() - Enable passing
contentType: falseto$.ajax() - Apply
focus()andblur()to all elements in collection - Change
$.fn.map()to return a Zepto collection - Selector argument for
on(evt, selector, fn)can be false - Don't raise error on
$('#') - Provide empty object in
$.support return falsein event handler calls stopPropagation()- Fix
$.isPlainObject()forwindowin Opera $.ajaxerror callback correctly reportsabortstatus- Fix
hasClassin collections of multiple elements - Stop iteration in
each()when the callback returns false - Add ability to set
xhrfactory per-request - Have
get()method accept negative index - Support for multiple class names in
toggleClass() - Fix error callbacks for
ajaxJSONP - Support optional
dataargument for various Ajax methods - Fix DOM insertion operators for null values
- Fix dataType being set for
$.getJSON