JavaScript has continued to grow in importance over the last decade. In fact, according to StackOverflow’s Insights, JavaScript has been the most popular programming language for the past 7 years, edging out popular languages including Python, C# and Java. The State of Javascript survey, which includes responses from over 20,000 developers, reveals that five JavaScript editors stand out accounting 95% of all usage!
Element Queries allow changing the size of a HTML element based on the style of other elements. Element queries are similar to media queries, but are based on element size instead of browser or view-port size.
JavaScript arrow functions are unnamed functions which are best used as non-method functions. They provide a short hand notation for using functions. An arrow function consists of a list of function parameters followed by an arrow which is followed by an expression to be returned or a code block.
JavaScript Modules are an implementation of ES6 Modules. They allow a useful way to organize and reuse JavaScript code. JavaScript Modules consist of a set of features that provide module functionality.
The ES6 standard has introduced several changes to JavaScript. These changes include Classes, Proxies, Promises, Modules, Iterators and Generators and more
The async keyword is used when declaring functions. A function declared with async must return a promise. If a function is declared with async and it does not return a promise, then the JavaScript engine will automatically convert the return value of the function to a promise object.
A Promise is defined as an object representing the eventual completion or failure of an asynchronous operation. When creating a Promise object, we have to pass a function called executor as the constructor parameter. The function should accept two functions as arguments called resolve and reject.
Web Components is a suit of different technologies that allow creating and using reusable custom HTML elements. Currently it is based on the three main features which are: Custom Elements, Shadow DOM and HTML Templates.
The addEventListener function can be used to listen for events. The function can be called on any HTML DOM object such as HTML elements, HTML document, the window object or objects that support events such as xmlHttpRequest. The following example shows how to attach event listener to the window object:
MediaElement Player is a HTML/CSS Video/Audio player for the web. It is based on MediaElement.js media framework library. Both player and library are available as open source and free of cost under the MIT license.
In order to drag and drop HTML list items, we need to set the draggable attribute of the list items to true. We also need to define event handlers on the list items for the following events: dragstart, drop and dragover.
CSS Grid Systems are CSS style-sheets that contain commonly used CSS classes. These CSS classes can be applied to HTML elements such as div tags. They provided functionalities such as tables and grids. The CSS classes are responsive so they work on devices of different sizes.
Designing your website so it is accessible on all type of devices is a popular topic and is often referred to as Responsive Website Design. This blog post describes my experience of developing a website according to Responsive Website Design principles.
Responsive website design is a design practice which aims at designing web pages with a layout that works on all devices. It involves several techniques such as responsive images, grid layouts, fluid layouts, media queries and more.
Responsive Design is a new trend in Web Design. It was started by Ethan Marcotte. Responsive Design is the design of websites that work well when viewed on a wide range of devices. For example a responsive website will look good on Iphone, Ipad, Tablets, Laptops and Desktops.