Category "javascript"

How to open a link in default browser in an electron app

I want to know how to open a web link in the default browser when clicked on a button in an electron app. Can anyone help me?

Upload speed testing function behaves differently when I call it from electron GUI

I've wrote a simple function to measure the upload speed of my network, which when run inside vscode terminal behaves just fine and displays the expected result

GMAIL: How to open a existing email in new window if I know its id?

Shortly: How to open email in gmail if I know its id in new window? Greetings. I get from GMAIL API the id of needed email. I want it to open in separate window

Send the selected option to the backend

I have a select menu (with three options) along with a search bar. All I want is to save the selected option and the searched term and send them to the back-end

NextJS with Serverless Mysql ServersideProps - fs error

I'm trying to build an app in nextjs and I've stumbled upon some issues. I'd like to do a query call inside my getServerSideProps() but I get the error: error -

How do you create a drop-menu with images next to each option in JS?

I looked up several tutorials on how to get the image next to the title, however, they are for small datasets that are manually inputted. Having almost 3,000 ro

I am seeing following error while trying to add firebase analytics

I have linked firebase analytics to the firebase project recently but I am getting the following error in my console and nothing is visible in the firebase anal

How do i replace eval

I have some existing code that looks like this. i = new Function("obj", "_", s); The parameter s contains an executable javascript code, as a string. At a late

React.Lazy not working when consuming Micro frontend with webpack 5 and plugin Module Federation

What is happening is that I am consuming a Micro front-end through module federation, but even using React.Lazy the bundle (remoteEntry) is loaded at the start

What is the best practice to quickly access big amount of data in the web browser?

I have this huge array of strings, saved in a JSON file on a remote server (the file size is 2MB and increasing).. In my front-end code, I need to constantly lo

pointerdown vs onclick: what is the difference?

What is the difference between the onpointerdown and onclick event handlers? Are there any practical differences? Are the events not propagated the same up the

How to apply HTML Table in React Native?

What I want is setting all the cells width in a column as widest cell in the column. For example I have a column and there are cells in that column. Cells have

discord.js disable “interaction failed”

If an interaction (for example button click) is not replied, discord will display “interaction failed” in the client What they expect you to do: int

Material UI unable to control the DatePicker error

I have a problem with the DatePicker, if there is an empty value it's red. And passing true/false to error doesn't have any effect. I even tried passing error

Cypress won't show an array contents into the console

I'm trying to add the titles of an iframe header into an array to then print the array with it's element into the console. The elements are added just fine, the

socket.io POST error and CORS policy error when sending messages too fast

In my frontend app I implemented mechanism which splits file into chunks and then sends their parts in a for loop like this (chunks is an array of strings - con

I can’t get Contentful connected to my site

So, I've only ever used WordPress, but I decided to build my site from scratch so I'm free to do whatever I want with my site. I'm a new developer and I just he

How to solve missing CORS headers when user defined headers provided?

Having troubles with providing Authorization header for requests: const response = await fetch(url, { method: 'GET', }); This works properly, and r

Grabbing a message mention taking longer than expected (DJS V13)

I'm using message.mentions.members.first() but the problem is that when I ping a user, the bot replies after a long delay. Video: https://gyazo.com/a8739e60bb86

Linking multiple hrefs to accordion and opening the corresponding section - Jquery

I have multiple hrefs that need to link to the proper accordion at the bottom of the page. The code I have now works, however I'm trying to minimize the amount