Category "javascript"

Promise allSettled is not a function

I planned updating some Promise.all to Promise.allSettled in my React Native - Expo Project but the function does not Exist. i checked all Versions and everythi

How to convert array of objects into custom grouped array

I am trying to convert the data object to custom format This is my data which i want to convert [ { Name: 15, GroupID: 1, Id: 1 }, { Name: 16, GroupID: 1,

Trying to use GoogleSignIn in React Native then Possible Unhandled Promise Rejection (id: Error: DEVELOPER_ERROR

I've enabled the Google SignIn on Firebase using this link https://rnfirebase.io/auth/social-auth My App compiles fine but when I press the Login button and sel

How to detect #enable-force-dark flag on Chrome v78+ using JavaScript?

I've recently designed and implemented a dark mode for my website that uses custom dark colors to match the light (default) color scheme, and I also recently be

Does CefSharp support the promises of the JavaScript?

JavaScript code below works in the console of the Browser. But when i put this code in CefSharp, CefSharp returns null. Im using CefSharp 100.0.120-pre. Does Ce

What's the best way to test props you pass to child components?

I'm testing a component using Vue test utils and Jest and I'm wondering what's the best way to test you are passing the correct values to a child components in

I'm getting blank react-app page on using Route

I'm having some kind of trouble when I'm using Router in App.js I'm getting a blank page when I am using, I tried a lot but couldn't found a way to solve the is

Selenium: How to execute scripts within the browser?

My current goal is to execute a script to my selenium browser that declares a var and then using DevTools access the variable in console log. Here is the confli

How to put a custom cursor on one of the particular section in a horizontal scroll website?

Where the cursor is currently and not moving to the next sectionI have a horizontal website, that is divided into sections and I am trying to put the custom cur

UrlFetchApp fetch how to retrieve JSESSIONID object for the cookies?

I'm trying to use UrlfetchApp to send a request to a page. Request is good. But returning <p>Your browser is currently set to block cookies. Please enable

Mapbox GL JS change marker image programmatically?

I am using Mapbox GL JS to display a lot of pins on a map with custom marker image: map.on('load', function () { map.loadImage("/path/to/pin1.png", function(

How to find exact length of pixel in mm

I am using an HTML, CSS, js template, and converting it to pdf with the android app. I had a problem detecting when will next page break so I can put an element

Prisma: update nested entities in a single query

I am using Prisma and Express.js to make requests to my MySQL database table. I have one-to-many relationship between my Contest-Round tables and am trying to w

How to save line breaks in database

I'm using typeorm to management my databse with nestjs framework on server and vuejs on client side, in settings i must provide a large text and i must to save

React useState - using one State per component vs multiples states? [closed]

What is a better way to optimize and do the code more readable in React using Hooks / Functional components; Having a single setState hook or

How to make drag event move in only one direction in javascript?

I'm using drag event for moving an element, but I didn't find a way to make it only move horizontally, it's there any clue for this? Thanks in advance!

Is it possible to have README docs appear first in Storybook navigation, then all stories after?

I have all Storybook stories nested under a “Docs” header. Every component gets a README mdx file, then as many stories as necessary. I would like f

Using v-html with message data -- does Vue not support the <title> element?

I am using Vue.js 2, my SDK is IntelliJ: I am trying to import HTML into a Vue.js file. The purpose is for the <title></title> attribute, since Vue

Add item to object if the object exists or create new object if it does not exists

I need to add an item to an object if the object exists, otherwise I need to create new object with the item. I know the existence of Object.assign function, bu

does npm node-cache value can be set in one file and access in another

i am working on a nodejs app where i have to maintain an api token for 24hr and then refersh it, currently i am writing that token on json file in every update