2,524,487 questions
0
votes
0
answers
19
views
Issue capturing response in http-proxy-middleware
I am writing a proxy to relay websocket messages to a backend server.
Client initiates a request over HTTP to upgrade to WS using a Sec-WebSocket-Key header. The proxy has to intercept the request and ...
-1
votes
0
answers
10
views
How would I properly transfer a program from freeCodeCamp into a React project set-up by Vite?
The question itself is vague, so I'll do my best to clear things up.
I completed a project on the freeCodeCamp platform which contains the following files: index.jsx, index.html, and styles.css.
I ...
0
votes
0
answers
36
views
Can I iterate over/get an iterable over multiple promises by order of their settlement?
In my code, I have a bunch of asynchronous tasks, which will be represented as Promises. Say, let those be:
let promises = myarr.map( (x) => myAsyncFn(x) );
I know I can get the first Promise out ...
0
votes
1
answer
26
views
Trying to build a To Do list project and when trying to add list items to my project it keeps duplicating
Hi I am a beginner to coding and I am trying to build The Odin Project To Do List . I have been stuck with this code for 2 days and this is my first time ever asking for help on a forum so please do ...
0
votes
0
answers
26
views
Embedded Flutter Dropdown/Overlay Web Element clipped by parent HTML element constraints
I am implementing Flutter Web Multi-View Embedding to integrate independent Flutter components into a React.js frontend. Following the official documentation, I am initializing each Flutter widget ...
0
votes
0
answers
25
views
Is it possible to see HTML behind a canvas where Three.js is rendered?
I made a example, here’s the link to it -
https://stackblitz.com/edit/vitejs-vite-cve3gcbr?file=package.json&terminal=dev
I tried to do this because it’s needed for this mockup.
Here’s the link to ...
-2
votes
0
answers
58
views
How can I restrict property to accept only components with specific props?
I want to create a table with a custom filter component for each column. The filter component props should implement the FilterComponentProps interface. The filter component type and its props are ...
0
votes
0
answers
55
views
React Hook Form client side validation not rendering
I have a form and in the console the errors object is populated properly but I am trying to prepar for complex forms so this being dynamoc matters
'use client'
import { get, useFieldArray, ...
-1
votes
0
answers
59
views
Unable to interact with elements within popover when "focus" trigger is set
As the title suggests, when the "focus" trigger is set for Bootstrap's Popover function I am unable to interact with the elements within the popover. In this example I added a popover ...
0
votes
0
answers
24
views
Azure Maps plane icon not following route direction when using snakeline + moveAlongPath
I’m using Azure Maps Web SDK to animate a flight path.
The route line is drawn using snakeline, and a plane icon is animated using moveAlongPath.
The problem:
The route line animates correctly.The ...
1
vote
1
answer
40
views
TextChanged Postback not firing when pasting input
I’m having an issue with this JavaScript: when I paste a number, the TextChanged postback is not triggered, whereas it works correctly when I type the value manually.
It’s a general control, and the ...
-5
votes
0
answers
95
views
How do i keep picking random numbers until the timer times out?
I have a script that allow the user to match the targetNumbers in any order in each input fields however when all the inputs field is locked (incorrect) the game reset and try again. I would like to ...
-8
votes
0
answers
46
views
I need help in CodePen.io. the audio won't play [closed]
I am working on CodePen.io and I have my HTML, CSS, and JS codes ready. Everything works perfectly, except for the sound. I've been struggling with this for two days, trying dozens of solutions ...
0
votes
1
answer
35
views
Extending class and assigning different value to an existing property
I'm trying to extends a class and assign a different value for a property that has been already defined in the parent class. The new value is from the allowed values:
class X {
constructor() {
...
1
vote
1
answer
124
views
created_at (server time) is sometimes earlier than clicked_at (client time) — why?
I’m tracking button clicks on my website and storing both client-side click time and server-side insert time in my database.
Frontend (JavaScript)
I capture the click timestamp like this:
clicked_at: ...
Advice
1
vote
1
replies
58
views
Javascript AudioContext play sound like musical instrument
I can play simple tone using code below.
But how can I generate sound like a musical instrument (piano, flute etc...) ?
function playTone(freq, duration, delay= 0) {
const osc = ctx....
0
votes
0
answers
71
views
audio from ElevenLabs API isn't played on browser when called
I'm building a little "educative game". My girlfriend is a bachelor for pedagogy and wanted to try an English learning game for a college project.
Here I tried to implement the ElevenLabs ...
0
votes
0
answers
47
views
Does compromise.js's POS tagger fail to tag 'time' as #Noun when between demonstrative pronoun and indefinite article?
const text = `This led him to settle in England, at that time an asylum for friends of freedom.`;
const doc = nlp(text);
const allNouns = doc.nouns().out('array');
console.log(allNouns);
<script ...
-4
votes
1
answer
103
views
I want to render a 3x3 grid of boxes for a Tic-Tac-Toe game. I am wondering how I can utilize a .map() function if the box holds no information [closed]
This is the lab I am currently working on:
https://www.freecodecamp.org/learn/front-end-development-libraries-v9/lab-tic-tac-toe/build-a-tic-tac-toe-game
My code so far:
index.jsx
const { useState } = ...
Advice
1
vote
3
replies
128
views
Confused which one to take: js or php for back end (Laravel or Node.js)
I am currently learning Laravel PHP, but I feel a bit confused. From what I see, there seems to be less demand for Laravel at the moment. On the other hand, I hear that JavaScript—especially Node.js ...
-3
votes
2
answers
91
views
Issues with trying to access a property of an object created [duplicate]
I'm collecting an array of data, saving it as array of custom objects, then trying to map it to a table. I have a constructor for my object type:
function cellData(x, value, y){
this.x = x;
...
1
vote
1
answer
77
views
Why do negative Y-axis labels disappear when decimal precision is set to 0? [closed]
I am using AmCharts version 3 in my BI project. I am facing a specific issue with the Y-axis labels when dealing with negative values.
When I set "Digits after decimal point" (precision) to ...
Advice
0
votes
3
replies
78
views
How can I recreate the mouse-hover particle animation from Google’s Antigravity page?
I’m trying to replicate the particle animation effect seen on Google’s “Antigravity” page.
Link
Specifically, I’m interested in how the particles react to mouse movement and hover interactions.
I ...
3
votes
2
answers
140
views
How to accurately "JSON.stringify" in php (codeigniter4) according to Node/express JSON.stringify for Sha256 validation?
I'm having problem comparing a sha256 for a webhook validation from this documentation:
API doc: docs.api.delyva.com
API guide: delyva blog
webhook validation (sample from API provider/delyva):
const ...
0
votes
0
answers
51
views
How to prevent user interaction interrupting JavaScript scroll(), scrollTo() or scrollIntoView()? [closed]
I have a multi-section form. When the user clicks the Next button at the bottom of the page, my script uses a smooth scrollIntoView() to scroll up to the nav bar. When the scroll has completed, (by ...
Advice
1
vote
6
replies
117
views
How can I take a picture of an entire page of a website (desktop) using JavaScript?
I am coding from my phone.
I want to get a full screenshot of my project's main app to display an example on the front (landing) page.
I obviously can't do this from my phone, and I don't want to use ...
Advice
0
votes
6
replies
94
views
How can I convert mp3/wav/m4a to aac using only vanilla JavaScript?
How can I do this without using any third party frameworks or libraries?
Thanks in advance for any help, with even just one of these (mp3, wav, m4a)
I am somewhat familiar with the Web audio API. I ...
-3
votes
0
answers
51
views
Playwright with produces false positives with toMatchAriaSnapshot on GitHub
Playwright is producing false positives on GitHub:
Github (passes): npx playwright test --grep-invert @prod --shard=1/3
Local (fails, same command, same commit as Github!): npx playwright test --grep-...
2
votes
2
answers
81
views
setInterval() method and useEffect hook not working as intended when trying to update 'timer' state variable
I am working on this lab on freeCodeCamp. I am having issues with the setInterval() method as well as the useEffect hook. Once I click on the button, with every passing second, the timer state ...
1
vote
3
answers
92
views
:focus-visible not triggered on parent :has() selector when focus is applied programmatically
:has(:focus-visible) not matching on programmatic .focus()
When calling .focus() programmatically the :focus-visible selector doesn't apply on buttons like it does on inputs, but tabbing to the button ...
Advice
0
votes
3
replies
37
views
After change an option in parent select the child select is not refresh automaticaly
I have an HTML page with a select box which, depending on the selection, displays the next select box.
var xxx_el = document.getElementById("xxx");
var clear = document.getElementById("clear");
var ...
-1
votes
0
answers
59
views
Shift HL7v2 Fields
I am trying to write a Mirth Connect function that takes an OBR segment and shifts the fields in it. It does shift the fields, but it is including the XML tags in it so for example my new OBR.25 looks ...
0
votes
1
answer
63
views
How to show inline icon in Text? Not at the start or end positions, but inbetween the text in react-native
I know how to show image at the end or start of text in a view, but what I want is to show icon inbetween the text.
Here's a Figma preview image for reference:
In my code I tried to create the above ...
4
votes
2
answers
131
views
Get multiple indexes of an array at once, for comparison
I am working on a Tic_Tac_Toe project. I have an object (gameBoard) that contains an array, then I have another object that i want to create a player from to play on the board, then I have a function ...
0
votes
1
answer
79
views
Production build crashes with "Cannot access 'lt' before initialization"; how to trace minified variable back to source [closed]
I have a React 19 + Vite 7 + TypeScript app that works perfectly in development but crashes immediately when I build for production and serve it.
After a successful build I preview the output using ...
Tooling
1
vote
3
replies
65
views
Service selling platform
I am developing a system that enables users to sell services and book consultants in the health and wellness domain.
For the backend, I am using Django REST Framework, and for the frontend, I am using ...
0
votes
1
answer
28
views
Why can't you pass props from +layout.svelte to +page.svelte files in SvelteKit?
From what I understand, $props from +layout.svelte are not inherited by its +page.svelte file (or any other child +page.svelte files), and there's no way to manually pass props from +layout.svelte ...
0
votes
0
answers
110
views
JQuery gallery with multiple instances not working
I have a webpage where I want to get multiple instances of the same JQuery-powered gallery tool.
The first instance works just fine; all the individul items are clickable, the arrows work, and moving ...
0
votes
1
answer
88
views
Update <selectedcontent> from DOM change
Chrome and Edge have a new feature that lets you style a <select>
<select>
<button>
<selectedcontent></selectedcontent>
</button>
<option>One</...
-1
votes
1
answer
93
views
How to control execution of multiple scripts on page load?
In my application I have a couple of scripts, common and page-specific ones.
<head>
<script type="text/javascript" src="/javascripts/menu.js"></script>
<...
0
votes
0
answers
77
views
How can a same-origin iframe keep handling top-window clicks after the iframe is removed? [closed]
I can only execute JavaScript inside a same-origin iframe, but I need to listen for click events on the top window.
The problem is that after the iframe is removed from the DOM, the click handler ...
0
votes
1
answer
104
views
Unexpected re-render despite no parent rerender and no change in props or state [duplicate]
I have been trying to optimize one of my team's component and despite successfully reducing the number of re-renders I have noticed one unexpected re-render that I just can't wrap my head around.
The ...
2
votes
1
answer
121
views
File chooser dialog can only be shown with a user activation
This is part of a larger project, but I've boiled it down to the minimal example that shows my problem.
I'm trying to define a div where a click anywhere in the div causes a file chooser popup. I've ...
1
vote
0
answers
61
views
How to isolate client certificates per browser context in Playwright for parallel execution? (Ubuntu)
I’m working on a system that performs login using client certificates and I need to run multiple browsers in parallel, each one using a different certificate.
The requirement is to fully isolate each ...
Advice
1
vote
3
replies
72
views
How can I get NPM to ignore package versions newer than a threshold by default?
The number of supply chain attacks grows, possibly as the population using classical PCs is skewing more towards people who make software.
There was recently an attack that involved a virus that ...
-2
votes
0
answers
100
views
Does ScriptBundle change the logic of JS?
So my coworker claims that we need to stop using System.Web.Optimization.Scriptbundle() everywhere because it is changing the contents of the JavaScript.
He has the following code which works locally:
...
0
votes
2
answers
43
views
pageswap event and cross document view transition snapshots
I'm following the logic here Cross-document view transitions for multi-page applications
The dom has changed since initial page load. My understanding is that javascript view transitions use the ...
-1
votes
1
answer
75
views
Override browser's built in 'jump/scroll to id in hashtag' functionality
I use hashtags a lot in URLs, to jump to a specific section of a page whose id matches the hashtag.
However I'd like to override this functionality to, for example:
Scroll to 200px above the relevant ...
0
votes
1
answer
126
views
Scroll-based text color animation - how to animate line-by-line instead of entire block?
I’m trying to recreate the scroll-based text animation used on SXSW’s website, where text transitions from gray to black as the user scrolls.
What I want:
- Text should animate line-by-line
- Each ...
0
votes
1
answer
64
views
WebAuthn PRF works in browser tab but not in installed PWA on macOS
I’m testing WebAuthn PRF for local encryption/decryption in a minimal PWA.
In a normal browser tab (Chromium-based), biometric flow works.
In the installed PWA (same origin, same device), navigator....