The Web Components community has a new site: WebComponents.org. Quoting Addy Osmani:
WebComponents.org is the home for the community to learn and discuss Web Components.
The site had previously been soft-launched at webcomponents.github.io and is now online at the final URL. It’s good to have a single site with a simple URL where one can look up information related to this important technology. The site’s twitter account is @Web_Components.
script
elementGuest blog post by Rodney Rehm
You may find yourself in a situation requiring you to know the DOM context of the JavaScript that is currently executing. The DOM context of a running JavaScript is the <script>
element that caused the JavaScript to be executed in the first place. With HTML5 the WhatWG introduced document.currentScript
, which this article will use to explain simple techniques to make use of DOM context.
In JavaScript, the special variable this is relatively complicated, because it is available everywhere, not just in object-oriented settings. This blog post explains how this works and where it can cause problems, concluding with best practices.
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):
There are a variety of software technologies out there for helping you with creating slides. Following are ones that I find intriguing: