ic-action-targetattribute, allowing for a distinct target for the
ic-sse-srcattribute, allowing intercooler to utilize Server Sent Events .
ic-swap-styleattribute, making append/prepend explicit attribute-driven behaviors.
ic-pollattribute now does not ignore dependencies.
ic-trigger-fromattribute, to allow specifying the element to listen to for the event that triggers an intercooler request.
autofocusattribute in intercooler AJAX responses.
ic-last-requestparameter to avoid cache busting. Server-side cookies should be used for more consistent refresh timing information.
ic-promptattribute now stops intercooler from issuing an ajax request.
data-*prefix on attributes via the
<meta name="intercoolerjs:use-data-prefix" content="true"/>meta-tag.
beforeAjaxSend.ic, which allows programmers to modify the setting hash passed to
$.ajax()to do thinks like add headers, set content type, remove parameters, etc.
ic-actionattribute, allowing for pure declarative client-side operations in intercooler.
ic-select-from-responsenow takes the inner HTML content of the given element, rather than the entire element. This makes the API more natural to work with, but unfortuantely breaks backwards compatibility.
ic-indicatorclass will now work on next sibling of element firing request
ic-patch-toattribute was added to suppor the
Intercooler.defineTransition()have been deprecated and now have no effect.
Intercooler.setRemote()have been deprecated and now have no effect.
ic-remove-classwere added to make it easy to create CSS transition based easements in your Intercooler application.
ic-global-includeallows you to include data with requests made by every element on a page.
ic-beforeTriggerallows you execute logic before Intercooler fires a request (and potentially cancel the trigger).
ic-pause-pollingallows you issue an element with an
ic-pollattribute in it that is in a paused state.
X-IC-ResumePollingresponse header allows you to restart polling for an element.
ic-post-errors-toallows you specify a URL for intercooler to post client side errors to.
ic-promptallows you to prompt the user for input before a request, asking for input.
ic-remove-afterallows you to remove an element after a given time period.
ic-scroll-offsetallow you to scroll to the top of a target if it is not visible in the viewport.
ic-transition-durationallows you to tell intercooler to wait some amount of time for a CSS transition to complete before a swap is done.
ic-trigger-nameparameters were all added to intercooler requests, to make it easier to dynamically determine which partial to render in response to a given url
X-IC-Trigger-Datahas been deprecated. The
X-IC-Triggerattribute can now be either a plain string for the event name, or a JSON object that satisfies the jQuery
parseJSon()requirements, where each property is an event name to trigger, and the value of each property is an array of arguments to pass to that event.
ic-select-from-responseattribute, allowing people to select sub-elements from a server response to swap in.
ic-includeattribute to allow for JSON name/value pairs to be included in a request.
ic-always-updateto true, so you have to opt out of content swapping now.
ic-remove-afterattribute, allowing people to remove an element after a given interval of time cleanly.
ic-push-urlattribute. Renamed the
X-IC-SetLocationresponse header to
X-IC-PushURLto be consistent with the new attribute.
ic-trigger-delayattribute to delay firing a request.
ic-replace-targetattribute, allowing full replacement of target elements for situations like replacing a table row.
ic-targetattribute via the
scriptelement, so things are properly reevaluated.
X-HTTP-Method-Overrideheader up in intercooler requests
X-IC-Requestheader up in intercooler requests
X-IC-Triggerresponse header to trigger client side event handlers.
The big enhancement in this release (small code change, but big functionality boost!) is the
response header, which finally solves a tricky problem I've been wrestling with: How do you communicate server side state
changes that have client-side UI ramifications that fall outside the usual Intercooler request-and-replace
partial view flow?
This new mechanism allows you to cleanly separate your server side and client-side logic even in cases where the simple content-swapping approach isn't enough.
A great example is if you want to hide a modal if and only if a form in the modal submits valid data to the
server. You can now easily fire an
server.accountCreated event (as an example) from the server side
and respond to that on the client side by hiding the modal. Clean, crisp and very little code!
You can download the latest
intercooler.js from the Downloads page.