Skip to content

Why can we define a setter with [[set]] if [[writable]] is false?

The ECMAScript language specification defines the [[writable]] attribute of Object.defineProperty() as following: If false, attempts by ECMAScript code to change the property’s [[Value]] attribute using [[Set]] will not succeed. However, this definition doesn’t make any sense. There it says that i…

input type number – max value

I have an input However, if the user write manually for example 200, the input accept it. Is it something normal ? I can validate the entry with javascript but if there is a build in in the html input it would be great 🙂 Thanks Answer I don’t think there is a solution directly with HTML; the max and

Jmeter – Sending forms with file through JavaScript

I have a problem with sending form with file through JavaScript using Jmeter. It simply does not succeeded. Unfortunately I do not have any logs from that situation. But when I am sending form without file parameter through JavaScript using Jmeter it succeeded. Once I add parameter with a file it does not. Tr…

Generate a const typed object in TypeScript

I am trying to generate a const typed object by passing in a string I want to use as the type, is this possible, I have tried the below and it’s bringing out the wrong type. I’d like this to be of type But instead it’s of type Answer In order to infer literal type of an argument, usually you

React – how to remove scroll listener

In Home Components, if you scroll down, you will see the Console log something. It’s because Which is Scroll Listener. The problem is that when I switch to other pages such as /about or /dashboard, the Console still log when scrolling because of console.log(e.progress);, which I want to get rid of when I swit…