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 highlights are described here. The full functionality can be found in the documentation.
document and window ready
With jQuery there was always a simple call to check if the document was already loaded.
$( document ).ready(function() {
// Handler for .ready() called.
});
But with vanilla you always have to listen for events or query the document ready status. So we have that in our lib too there are two new promises.
domReady.then(()=>{
// do something
}).catch(e => done(e));
and ...
windowReady.then(()=>{
// do something
}).catch(e => done(e));
hope you enjoy it!
Top comments (0)