Commits on Dec 4, 2013
  1. @mislav @mislav

    Create a benchmarking platform

    Starting the test server and visiting `/test/benchmark.html` runs
    some DOM operations (individual files in `test/performance/`) and
    compares their speed between the current working copy of Zepto, Zepto
    v1.0, jQuery 2 and a pure JS implementation of the same operation.
    It reports to the server the speed difference of Zepto vs jQuery; e.g.
    "24%" means Zepto is that much faster doing this operation than jQuery.
    Negative percentage means it's slower.
    Example server log after a run on the iPhone 4:
      [iOS 7.0.4] single classname: 24% (+/- 7.67%)
      [iOS 7.0.4] single ID: -26% (+/- 11.5%)
      [iOS 7.0.4] create element: -47% (+/- 10.71%)
    mislav committed with mislav Sep 27, 2012
  2. @mislav
Commits on Dec 3, 2013
  1. @mislav
  2. @mislav

    Support passing `false` as event callback

    It's equivalent to specifying a callback function that simply returns `false`.
    Fixes #845
    mislav committed Dec 3, 2013
  3. @mislav
  4. @mislav

    Don't let the event delegation selector match the host element

    jQuery compatibility
    Fixes #801
    mislav committed Dec 3, 2013
  5. @mislav

    Enable HTTP Basic auth via `username/password` Ajax options

    I couldn't add a test for failed auth for two reasons:
    * With no/wrong credentials, Chrome displays a blocking password dialog
      to the user.
    * Browsers cache credentials from one request and use it in another to
      the same host, leading to non-isolated tests.
    Fixes #627
    mislav committed Dec 3, 2013
  6. @mislav

    Fix delegating focus/blur events in IE

    These events don't bubble natively in any browser, so we used event
    capturing to provide event delegation support for them. This workaround
    doesn't work in IE, however.
    This translates focus/blur events to focusin/focusout, which bubble
    A potential pitfall of this change is if a user inspects `event.type`
    inside an event handler for "focus", for instance, they will get
    "focusin" back.
    References #869, fixes #868
    mislav committed Dec 3, 2013
  7. @mislav
  8. @mislav

    Reliably detect `defaultPrevented` event state on Android 2.3

    Android 2.3.7 browser doesn't support either `defaultPrevented` property
    nor `getPreventDefault()` method, but it does set `returnValue` to false
    once `preventDefault()` gets called.
    References #871
    mislav committed Dec 3, 2013
  9. @mislav

    Add an "Expires" header to Ajax caching test

    Unfortunately it doesn't fix the Android 2.3 intermittent failure.
    Sometimes it will reuse cached response, sometimes it will refetch.
    mislav committed Dec 3, 2013
  10. @mislav

    Silence test warnings about unexpected JSONP globals

    The test runner is set up to display warnings about leaked global
    variables. Since we expect to have artefacts of JSONP requests in form
    of keys named "jsonpXY" on the window object, this explicitly cleans
    them up so they are ignored.
    mislav committed Dec 2, 2013
  11. @mislav

    Fix JSONP callbacks for errored responses on Android

    Android 2.3 doesn't call the `onerror` handlers for HTTP 500 responses
    like it does for 404s. However, it does trigger the `onload` handler.
    This rewrites the JSONP implementation to use a combination of `onload`
    and `onerror` handlers to invoke the standard Ajax callbacks. If the
    JSON data was never received, this always treats it as an error even if
    it executed through `onload`.
    References #871
    mislav committed Dec 2, 2013
Commits on Dec 2, 2013
  1. Skip test of live extension of existing Zepto objects and browsers th…

    …at do not support __proto__
    committed Dec 2, 2013
  2. Fix `fx` module on IE10/11, references #869.

    No vendor prefixes are required on these browsers.
    committed Dec 2, 2013
  3. Fix stack test on IE

    committed Dec 2, 2013
  4. @mislav

    Simpler `stopImmediatePropagation()` implementation

    We need this in browsers which do not support it natively, namely
    Android 2.3. However, there's no need for the full-blown polyfill.
    The downside of not being a full-blown polyfill is that
    `stopImmediatePropagation()` won't affect handlers that are not added
    via Zepto's event methods; e.g. those added directly with native
    References #871
    Reverts a1a9dce
    mislav committed Dec 2, 2013
  5. Polyfill stopImmediatePropagation on Android 2.3, references #871.

    This makes `zepto.html` pass completely on Android 2.3, and
    fixes these failures:
    EventTest#testTriggerHandler: Result of expression 'e.isImmediatePropagationStopped' [undefined] is not a function.
    EventTest#testEventsOnPlainObjects: Result of expression 'e.isImmediatePropagationStopped' [undefined] is not a function.
    committed Dec 2, 2013
  6. @mislav

    Merge branch 'event-ext'

    Closes #864
    mislav committed Dec 2, 2013
  7. @mislav

    Report test failures to the test server

    This helps debugging on devices which have a crippled or nonexistent
    JavaScript console. Each test failure or exception is reported to the
    test server, which displays them on STDOUT.
    If a stack trace is available (depends on the browser), it will be
    displayed as well.
    A new debugging helper is available: `t.debug(obj)`. It logs the string
    representation of `obj` to the server.
    mislav committed Dec 2, 2013
  8. @mislav

    Add more descriptive assertion message for Android failure

    On Android 2.3.7, the fact whether default was prevented doesn't seem to
    be accessible on the event. Even though Android 2.3 doesn't support
    the `defaultPrevented` property, it was supposed to support the legacy
    `getPreventDefault()` method, but it doesn't. So this failure remains.
    mislav committed Dec 2, 2013
Commits on Dec 1, 2013
  1. Avoid browser caching when running tests.

    To avoid hitting browsers caches the tested JavaScript files now are
    loaded with a querystring that contains the current time.
    committed Dec 1, 2013
  2. Revert "Fix an issue with val() returning invalid values on Chrome fo…

    …r Android, fixes #870."
    This reverts commit 9cf3adf.
    committed Dec 1, 2013
  3. Fix an issue with val() returning invalid values on Chrome for Androi…

    …d, fixes #870.
    Note that this fix exposes an issue where `removeAttr` doesn't correctly
    remove the `selected` attribute from `option` elements on IE. This will
    be handled in a seperate fix.
    committed Dec 1, 2013
  4. @mislav

    Fix `defaultPrevented` tests for Android 2.3

    This property is not present in Android 2.3 so it shouldn't be used in
    tests. Instead, use `isDefaultPrevented()` which is guaranteed to be
    mislav committed Dec 1, 2013
  5. @mislav

    Provide `isDefaultPrevented()` & related methods for all events

    Previously, these methods were only available in event delegation handlers:
    - isDefaultPrevented
    - isPropagationStopped
    - isImmediatePropagationStopped
    For compatibility with jQuery and for avoiding cross-browser differences,
    now every event is extended with these methods before it's passed to an
    event handler.
    Alt. for #864
    mislav committed Nov 29, 2013
  6. @mislav

    Don't send Ajax `data` query params in GET request bodies

    For GET requests, the value of `data` gets appended to the URL as query
    params. However, the serialized params string was also erraneously
    passed as request body to `xhr.send()`.
    This resets the `data` option to null after appending it to the URL. As
    a consequence, the value of `data` is no longer available in
    `beforeSend` callback for GET requests since the URL is already
    constructed and it will be too late to change it. To change query params
    in this callback, you must edit the `url` directly.
    mislav committed Dec 1, 2013
  7. @mislav
Commits on Nov 30, 2013