HTML custom input with type hidden and number1 min read

I don’t think it is possible to a create an element like <input type=”hidden | number” /> Solution is to create a custom element like this <hidden-num value=”0″></hidden-num> MDN – Using Custom ELements (https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) class InputHiddenNum extends HTMLElement { constructor() { super(); } connectedCallback() { this.style.display = “none”; } get value() { return this.intern_value; } […]

GST(Indian) check digit validation algorithm2 min read

GST number validation is done through 2 steps Check if there is a character in position of a character and a number in position of a number. Validate the check digit that is the last character in the GST no. with  Luhn mod N algorithm (https://en.wikipedia.org/wiki/Luhn_mod_N_algorithm) An implementation in javascript let GST = { /* Luhn […]

Electron: Share sessionStorage between window and webView?1 min read

I wanted to declare global const/var that were specific for an app instance. Here is a scenario – The app asks for username as soon as it starts and saves it for use unitil the app is closed. If the app was run two times, I didn’t want these instances to have the same username […]