Igor Alexandrov

Programming and something else…

Wiselinks-0.6 Release

| Comments

Last week was full of new releases. On monday Attrio reached 0.2 version and this release was already mentioned on RubyFlow. And on holidays Wiselinks was updated to 0.6 and I want to show you a short list of changes, fixes and upgrades.

Great job was done to refactor Wiselinks from one long class that looked like a sheet and smelled very bad to five clear and understandable classes. Wiselinks is much easier to maintain now.

Three issues were closed:

Also now we can guarantee that page:redirected event is triggered before page:done or page:fail events. There were some problems with this in non-HTML5 browsers.

And of course new cool feature was added. Now you can specify what Wiselinks will do if target is not found in DOM. By default it will do nothing (like it was before), but also it can throw an exception. To enable this pass ‘target_missing’ parameter to Wiselinks during initialization.

#= require jquery
#= require wiselinks

$(document).ready ->
    window.wiselinks = new Wiselinks(
      $('something that does not exist'),
      target_missing: 'exception'

[Wiselinks] Target missing exception will be thrown. This also works for data-target attributes.

Thanks for all contributors!