Category "javascript"

How to use Stripe's secret key and publishable key?

I would like to connect with the Stripe API using a https call using the https library. var https = require('https'); I have gotten the secret key and publis

Dynamically-added Parameter to JS File (cache-busting) Does Not Cause Reload

I've added a random date param to my CSS and JS files in order to "cache-bust"... HTML (head) <!-- STYLE --> <link href="assets/css/style.css" rel="s

Shrinking sticky sticky header causes flicker in Blink/Webkit at certain scroll positions

I have a sticky header which utilizes IntersectionObserver to gain a class when stuck, which then hides a few elements and reduces the size of the logo. Of cour

Pattern for Firebase onAuthStateChanged and Navigation Guards - Quasar app

I am facing an issue in my Quasar app with regards to browser refresh and Firebase authentication. After a user logs in and then clicks on the browser refresh,

Object.create({}): Is is a good practice?

I've been talking to some professionals who work with JavaScript in a company, and I've been told that it isn't a good practice to create an object instance usi

Why wont my if statements work in cypress?

I'm trying to write a test that goes back in a calendar to look for a specific date to click. I have come up with an IF statement that should loop to the next m

How to register pg-promise with hapi

I try to register pg-promise as hapi plugin. However, the following error occurred. TypeError: Cannot read properties of undefined (reading 'name') at interna

StencilJS: How to compile a component production-ready (so it's simple to be used in projects)

A group of volunteers has created a single/multi-select component using StencilJS: https://github.com/NothingAG/adg-components Now we want to hand it over to th

How to detect if running in the new Windows Terminal?

An upcoming feature of the Windows Terminal preview is that it has full emoji support: Compared to: In Node.js, how do I detect if I'm running in a termin

Why isn't Puppeteer page.click waiting (maybe Browserless?)

Goal: I have a page that I need to get html from after first clicking something on the page. Issue: The html that comes back is not waiting for that element cli

Error "Error: A <Route> is only ever to be used as the child of <Routes> element"

I am trying to use routing for the first time and followed the exact instructions from Udemy: File App.js: import { Route } from "react-router-dom"; import Welc

Firebase: Error (auth/invalid-api-key) with demo project

I am trying to write some automated tests with the Firebase client sdk. These tests are supposed to use the Firebase Auth Emulator. In order to avoid screwing u

React js function not found in package

When using ElvWalletClient.Item({"x":"1","y":"2"}) from import { ElvWalletClient } from "@eluvio/elv-wallet-client"; I receive the following error eluvio_elv_

JQuery .on("click") triggers "mouseover" on touch device

I'm encountering unwanted behavior when using JQuery's $.on("click", function(){}); on touch devices. This is my code below: Code: $(".team").on("mouseover",

check that a word is an isogram with pure javascript

How do i check that a given word is an isogram with pure javascript, using a function. the function must return true or false. An isogram is a word with a repe

How to fix viewport in place when virtual keyboard opens in mobile Safari?

Goal On mobile Safari, when the virtual keyboard is open, the screen should render like this image: where: The navbar and the input are fixed in place The list

Command `yarn add react-native --exact` failed

I tryed to create new project but this happen , I update the core as they said here How to update core-js to core-js@3 dependency? but also no thing help me I

Error on text-to-speech api : ReferenceError: speechSynthesis is not defined

I'm making a program in quasar framework (who works on vue and can be compiled on mobile by cordova). And i'm having some issues to run it on mobile. here's the

How to host material icons offline?

My apologies if this is a very simple question, but how do you use google material icons without a <link href="https://fonts.googleapis.com/icon?family=Ma

How to use vue router and vuex inside custom element from root?

I have project with nested custom elements. Now I need to vuex & vue router. How I can use this packages from root custom element and then use in all child