JAJohn Au-Yeunginjauyeung.hashnode.dev·Mar 20, 2021 · 3 min readHow to Retrieve the Position of an HTML Element Relative to the Browser Window?Retrieving the position of an HTML element relative to the browser window is something that we’ve to sometimes in our JavaScript web app. In this article, we’ll look at ways to get the position of an HTML element relative to the browser window. The g...00
JAJohn Au-Yeunginjauyeung.hashnode.dev·Mar 20, 2021 · 4 min readHow to Add an Image Preview When an Image File is Selected in the File Input?Adding a preview for the selected image is something that we’ve to do sometimes in our JavaScript web app. In this article, we’ll look at how to add an image preview to show the image the user is selected. Add an Image Preview for a File Input To add...00
JAJohn Au-Yeunginjauyeung.hashnode.dev·Mar 20, 2021 · 4 min readHow to Add a New Array Elements at the Beginning of an Array in JavaScript?Adding a new array element to the beginning of an array is something that we’ve to sometimes in our JavaScript apps. In this article, we’ll look at how to add new array elements at the beginning of an array in JavaScript. Array.prototype.concat One w...00
JAJohn Au-Yeunginjauyeung.hashnode.dev·Mar 20, 2021 · 13 min readTypeScript Advanced Types — Type GuardsTypeScript has many advanced type capabilities which make writing dynamically typed code easy. It also facilitates the adoption of existing JavaScript code since it lets us keep the dynamic capabilities of JavaScript while using the type-checking cap...00
JAJohn Au-Yeunginjauyeung.hashnode.dev·Mar 20, 2021 · 11 min readUsing Design Mode and execCommand to Fiddle with Web PagesTo make fiddling with the design of webpages easy, modern browsers have a design mode built-in. We can toggle it on with the document.designMode property set to 'on' . Furthermore, we can send commands to change the page when it’s design mode with th...00