Quantcast
Channel: javascript – frag (frăg)
Browsing all 37 articles
Browse latest View live

So you want delayed events in your mootools class?

I recently found that in the context of Class, .fireEvent() accepts a 3-rd argument, delay. Firing deferred events can be useful but you need to understand the full difference between the patterns...

View Article


Epitome goes CI via buster.js and Travis CI

Just a quick note – the MooTools MV* framework I wrote for QMetric called ‘Epitome‘ is now covered by Travis CI automated testing. Read more about how to implement this in your javascript projects in...

View Article


Epitome does todo

Just a quick update, my MooTools MVP library Epitome now has its own Epitome-todo repository as a submodule, an implementation of the popular TodoMVC demo. You can see it live here. If you checkout...

View Article

Spying unobtrusively on Class instance events in MooTools

Ever needed to debug how your Class instances fire Events? It can be frustrating and messy, especially if you do not have access to the original Class prototype source. But, you can hack your way...

View Article

Extend Slick pseudo selector to find data-attributes

This is a relatively simple idea. Select elements with data-attributes that match a pattern, for example, div[data-media-*]. The problem is, CSS selectors don;t allow you to wildcard attributes...

View Article


Image may be NSFW.
Clik here to view.

Preloading images using javascript, the right way and without frameworks

There are two scenarios here. Case 1: you just want to load all your images prior to displaying the rest of your page. Whether that’s because you like it this way or you need to get the browser to...

View Article

Hiding enumerables after MooTools changes prototypes

One of the most common complaints of people when using 3-rd party code that breaks on MooTools pages is when somebody incorrectly tries to iterate through an Array with the for (var in) operator and...

View Article

Doctor, MD – updated for recess 1.1.8 and BootStrap 2.3.2

Just a quick note, updated my nodejs Markdown to HTML site generator Doctor to support the latest recess and BootStrap 2.3.2, latest stable published npm is v0.1.14 The grunt-doctor-md grunt task has...

View Article


Epitome now available as npm and under CommonJS

Just a quick update, Epitome now supports nodejs. Here’s an example creating a server via express and socket.io with a collection and a model that can be shared on the client as well: #!/usr/bin/env...

View Article


localStorage and sessionStorage events to send messages acrosss browser...

This is a somewhat underused and lesser known feature of HTML5 localStorage API. The spec says: The storage event is fired when a storage area changes, as described in the previous two sections (for...

View Article

Tooling for the node.js generation, part I

If you are a front-end developer that has dabbled a little bit in node and like it, you probably need to build a list of tools (npm modules etc) you can use in your day-to-day development. Here’s a...

View Article

Image may be NSFW.
Clik here to view.

primish. It’s like mootools prime but for the intarnets

We waited for ages for MooTools prime to come out and to get adopted and for web builds to show up and to become more MooTools-y. And then, we thought (me and the Grookedge who’s also a MooTools...

View Article

Tooling for the node.js generation, part II

In the previous article, a number of things got covered that help with npm modules you’d want to use in your node.js projects. This is a continuation. anything in a require() is an npm module,...

View Article


Spy on any method on an object and profile number of times called

So, Object.observe will become a standard at some point. In the meanwhile, you may want to unobtrusively log any methods called on an object from the outside. So I wrote this little snippet that helps...

View Article

Introducing Epik: micro MVC on top of primish and lodash

Nearly two years ago, I started work on Epitome, an MVC framework for MooTools. And today, it’s pretty stable and a viable project to use, if you have MooTools in your stack, rather than jQuery....

View Article


Using RequireJS sugar syntax in main.js files

I love the sugar API of RequireJS. It’s elegant, clean and nearly identical to CommonJS. However, the examples often fail to demonstrate how to use it from a main.js file which does a require call,...

View Article

The bane of all reactjs newbies: binding event handlers

It is fair to say at least 1/3 of all reactjs questions posted on StackOverflow can be solved by understanding simple DOM event handler binding. Typically, they look like this: class EmailSignup...

View Article

Browsing all 37 articles
Browse latest View live