Skip to content

Releases: fpereiro/cocholate

4.0.0

27 Feb 11:43
Compare
Choose a tag to compare

Changes to c.test:

  • Breaking change: before a test passed if the check function returned anything other than false. Now, for a test to pass, the check function must return true - any other return value is considered an error.
  • Add optional callback function.
  • Allow for no-op tests (empty arrays).
  • Add optional ms argument in the wait function passed to action, to retry every ms milliseconds until the condition is met or wait is elapsed.

3.1.0

08 Aug 08:58
Compare
Choose a tag to compare
  • Enable global prod mode by setting c.prod to a truthy value.
  • Fix bug in c.setop with nested or selector, in which repeated elements were returned in the output.
  • Upgrade teishi v5.0.3 -> v5.1.0

3.0.3

19 Nov 12:09
Compare
Choose a tag to compare
  • If c.get is invoked to get all non-CSS parameters, don't add a field for class unless there's a class present.

3.0.2

08 Oct 05:01
Compare
Choose a tag to compare
  • Invoke c.fire to trigger the change event in c.set (if the notrigger flag is not passed).
  • Add try/catch in c.fire when the combination of element type & event is not supported (IE<=8).

3.0.1

01 Jul 12:16
Compare
Choose a tag to compare
  • Allow most characters in selectors in old browsers that don't support document.querySelectorAll (IE <= 7, FF <= 3), with the exception of []>,.

3.0.0

23 Jun 10:59
Compare
Choose a tag to compare
  • c.fill removes unnecessary call to c.empty and instead uses innerHTML.
  • Bugfix: c.empty now also removes text nodes as well and completely empties its target(s).
  • Changes to c.loadScript:
    • It now returns request object returned by internal call to c.ajax.
    • If no callback is passed, it will default to an empty function.
  • Change to c.fire: the on prefix to event names is automatically added in IE8 and below.
  • Add c.test, a function to run tests.

2.3.0

10 Dec 22:42
Compare
Choose a tag to compare
  • Small breaking change: c ('body') will now return a single element (document.body) instead of an array containing the body. The same will happen for all the DOM functions when receiving 'body' as the selector. Since there can only be one body per document, it makes no sense to return an array with a single element in this case. To upgrade to this version, replace any occurrence of the form c ('body') [0] by c ('body') (and likewise for DOM functions).
  • Bugfix: c.get returning all attributes in IE6-7 now returns class for input elements.

2.2.1

09 Dec 12:02
Compare
Choose a tag to compare
  • Bugfix: v2.1.0 broke c.ajax when either sending or receiving JSON - the teishi.str and teishi.parse functions were not renamed after upgrading to teishi v5.0.0. This is fixed in the new version, and a new test was added to cover the case where the function sends JSON.

2.2.0

27 Nov 12:51
Compare
Choose a tag to compare
  • Bugfixes: headers object passed to callback by c.ajax:
    • On cocholate 2.1.1, the headers were false. This is now fixed.
    • On cocholate 2.1.0 and below, the headers contained a key that was an empty string and the value was undefined. This is now fixed.
    • In Firefox 18 and below, c.ajax now splits headers correctly instead of lumping them all into one.
    • If a header value contains a colon followed by a space, the entire header value is considered instead of all the text after the colon + space being ignored.
  • You can now pass a DOM node to any of the c DOM functions, to operate directly on that DOM node.
  • You can now get all attributes (or style attributes) by passing an undefined second argument to c.get.
  • Upgrade dependencies: dale v6.0.0 -> v6.0.1, teishi v5.0.1 -> teishi v5.0.2

2.1.1

19 Nov 15:29
Compare
Choose a tag to compare
  • Upgrade dependencies: dale v5.0.3 -> v6.0.0, teishi v5.0.0 -> teishi v5.0.1