The interoperability of Web Component polyfills

At the moment, there are two polyfills for the upcoming Web Components standard (roughly, for widgets): Fortunately, the three ways of writing a Web Component (via the Polymer polyfill, via the X-Tag polyfill or by using the APIs directly) are interoperable. Quoting “Custom Element Interoperability” by the Polymer team:
We’re happy to say that, yes, custom elements of any variety (be they Polymer, X-Tag or vanilla) can all happily coexist.
The blog post explains how that works and provides an example that you can download from GitHub.

Third Web Component polyfill: @b_lionel told me about Bosonic, which is partially based on Polymer and also interoperable.


Handling required parameters in ECMAScript 6

In ECMAScript 5, you have a few options for ensuring that a required parameter has been provided, all of which are somewhat brittle and inelegant:
    function foo(mustBeProvided) {
        if (arguments.length < 1) throw new Error(...)
        if (! (0 in arguments)) ...
        if (mustBeProvided === undefined) ...
In ECMAScript 6, you can (ab)use default parameter values to achieve more concise code (credit: idea by Allen Wirfs-Brock):


What is the true nature of lions and hyenas?

Kevin Richardson is a South African zookeeper who has been accepted into several clans of spotted hyenas and prides of lions. His years-long relationship with these animals illustrates a different side of them: they can be affectionate and cuddly. Given how many atrocities humans commit to get their food, you have to wonder what one should consider the “true nature” of lions and hyenas. More information:


The maximum call stack size

Are you curious how many recursive calls you can make on your JavaScript engine?


In search of the perfect technology for slides

I many cases, if you are presenting in front of an audience, you will create slides, visual material of some kind. I’m a very visual person myself and learn much better if I can read in addition to listen. Slides are also helpful when you lose attention for a few seconds.

There are a variety of software technologies out there for helping you with creating slides. Following are ones that I find intriguing:


Making checkbox labels clickable via <label>

The <label> element has been around for a while, but I still don’t see enough websites use it. In lets you make labels of checkboxes and radio buttons clickable.