Posts tagged ES6


Detecting a click outside an element in JavaScript is a very common pattern that can be used to close a non modal user interface component like a flyout, a menu or a dropdown when the user clicks outside this element. While searching on the web there are a lot of

The HTML5 template element is a tag that isn’t used that much but is very useful to prepare reusable HTML structures that can be instantiated and populated with JavaScript. The DOM API and JavaScript don’t offer any native data binding. Though with the template element we can implement

The Scalable Vector Graphics SVG format is a vector image standard. A SVG document has an XML structure and can be used as a standalone file but it’s now an integral part of the HTML5 language. We can use the SVG element directly in an HTML document, style it

In HTML the heading elements represents 6 levels of titles from h1 for the most important to h6 for the least important. Some Content Management Systems offer the possibility to automatically generate a table of contents from an article on the server side. But here I’m implementing a reusable