It was a great event today at @co_up in @berlinjs meet-up and here are my sides about wru which accordingly with today meeting means where are you, directly out of SMS syntax.
There are way too many ways to stub functions or methods, but at the end of the day all we want to know is always the same: has that function been invoked ? has that function received the expected context ? which argument has been passed to that function ? what was the output of the function ? Update thanks to @bga_ hint about the output property in after notification, it made perfect sense The Concept For fun and no profit I have created a prototype which aim is to bring a DOM like interface to any sort of function or method in order to monitor its lifecycle: the "before" event, able to preventDefault() and avoid the original function call at all the "after" event, in order to understand if the function did those expected changes to the environment or to a generic input object, or simply to analyze the output of the previous call the "error" event, in case we want to be notified if something went wrong during function execution the "handlerer...
This is a quick one already discussed during my recent workshop in Warsaw, a concept rarely considered or adopted from JS developers. What Are Polyfills If we are updated enough to know ECMAScript 5th Edition, we probably know all possible shims and fallbacks for Array extras as well (e.g. Array.prototype.forEach ). Polyfills are simply snippets able to bring features already available for most recent browsers into those not updated yet. Why Polyfills If we develop with present and future in mind, we can take advantage of most recent techniques and solutions in order to both speed up via native support, where available, and maintain our application just stripping out code once all target browsers support them natively ... isn't this cool ?! Polyfills Side Effects The most common side effect of a polyfill is performances impact . The Array::forEach is already a good example of decreased performances. If we think about a forEach, it's nothing different than a classic for loop , e...
In this Web 2.something era there's a big problem with noscript tag and I wonder what does W3 think about them. noscript and its standard implementation This tag is really useful to increase page informations or accessibility, allowing developers to show an alternative content if user has not JavaScript enabled or his browser doesn't support other kind of tags. <script type="text/jvascript">doStuff()</script> <noscript>Your browser can't do my Stuff</noscript> This is a basic example of noscript usage and expected behaviour is that every JS compatible browser will try to execute code insde script tag while every JS disabled or not compatible browser will show an alternative information. So, what's wrong with noscript ? When a browser is JS compatible ignores totally noscript tag. It doesn't render its informations, just " jump " after the end of this tag. At the same time, if a browser is not compatible with tag used bef...
Comments
Post a Comment