Skip to content

v0.8.0

Choose a tag to compare

@panoply panoply released this 01 Mar 00:26
· 22 commits to master since this release
b720197

Relapse v0.8.0

Release ships with some minor enhancements that extend the existing API.

Fixed auto-typed import

In v0.7.0 the module would use an upcase import within TypeScript environment, the lowercase relapse will now apply.

Smaller Distribution bundle

Relapse is now 2.5kb gzip with saving of 0.2kb - It is unlikely it will get smaller.

Allow element to be reset on instances

Previously, an instance would provide the element as a getter. This version allows for the element key to be reset.

Incrementally apply attribute annotation

This helps limit the amount of operations relapse will carry out. If attributes exist pertaining to A11y logic then relapse will not reset them. Mostly an internal minor patch.

Added reinit() method

Given the way Relapse is designed, sometimes it be preferred to reinitialize an existing instance. The reinit method can provide this functionality and is available to all instances with an additional global method provided.

import relapse from 'relapse';

// GLOBAL METHODS
relapse.reinit() // Reinit all active instances
relapse.reinit('id') // Reinit an instance by id
relapse.reinit(['foo', 'bar']) // Reinit the following instances only

// INSTANCE METHOD
const demo =  relapse(); // Create an instance
...

demo.reinit(); // Reinit the instance