[go: up one dir, main page]

DEV Community

Cover image for Monster 1.27 released
Volker Schukai for schukai GmbH

Posted on

Monster 1.27 released

Today we released the latest edition of our Monster project. Monster is a collection of javascript classes that we need for daily work in our web projects.

Besides small helper functions and classes, it also provides useful functions to enable reactive programming.

Monster is available via jsdelivr and npm.

Only the changes are described here. The full functionality can be found in the documentation.

Updater

Until now the binding data-monster-bind of input controls worked via various events. With this release, the updater can now also perform updates manually.

<input id="id1" data-monster-bind="path:my.key">
Enter fullscreen mode Exit fullscreen mode
const obj = document.getElementById('id1');
obj.value="hello";

const updater = new Updater(document.querySelector('body'));
const subject = updater.getSubject();
// ↦ {}

updater.retrieve();
// ↦ {my: {key: "hello"}}

Enter fullscreen mode Exit fullscreen mode

findClosestByClass

The new helper function findClosestByClass summarizes the check to a class selector. The small helper function is used within monster to find elements.

Fixes

  • template: find themed templates

hope you enjoy it!

References

Top comments (0)