2,521,501 questions
Score of 3
1 answer
45 views
Adding a Private property to CanvasRenderingContext2D
I am trying to extend CanvasRenderingContext2D to add a few more methods. I know that it’s not a simple matter of using extends because, apparently CanvasRenderingContext2D doesn’t permit normal ...
Score of 1
0 answers
48 views
Why does clicking the icon inside a dynamically added button not trigger my delegated click handler, while clicking the button text does?
I am building a small task list where items are added with JavaScript. Instead of adding a click listener to every button, I added one listener to the list itself. Each item has a delete button with a ...
Score of -3
0 answers
60 views
How can a user uninstall a Chrome JavaScript SpeechRecognition.install language pack?
In Chrome you can now run the JavaScript command:
SpeechRecognition.install({
langs: ["en-US"],
processLocally: true,
})
Any website can run it to install a ...
Score of -4
1 answer
77 views
How to display the numbers after using API Get question
Goal:
Display a number of the content fron the list. The list is from the API get.
The expected result is to retrieve the data and then display it.
Problem:
Cannot read properties of undefined (...
Score of 2
2 answers
87 views
Dealing with unsupported media type in HTML5 audio element?
I running into an issue whereby the audio player, is not creating an error event for media types it doesn't support.
My test is providing an MP4 file containing an Apple Lossless Audio (ALE) payload ...
Score of 1
1 answer
93 views
In WebGPU, is it faster to use a single interleaved GPUBuffer for positions, normals, and UVs? Or should I use separate GPUBuffers?
I’ve been learning how to use WebGPU.
Right now I’m learning about setVertexBuffer() and how you set bindings that your shader can use. In my exercise code, I’ve decided to use three separate ...
Score of 0
3 answers
148 views
How to smoothly animate container width/height when switching between slides with different text content without text reflow jumps?
I'm building an auto-rotating slideshow where each slide has a callout box with different text content. When transitioning between slides, I want the callout box to smoothly resize to fit the new ...
Score of 2
1 answer
168 views
Function bubble wrapped in propagation
I was trying to create a function that would toggle between 2 commands, but it seems to be a victim of Event Bubbling and I don't know how to get past it. event.stopPropagation() doesn't prevent the ...
Score of -5
0 answers
132 views
Why does my async function return "Promise { <pending> }" instead of the fetched data in JavaScript? [duplicate]
I’m trying to fetch data from an API and store it in a variable to use later, but when I log it I get Promise { <pending> } instead of the JSON.
Environment: Node.js 20.11, no external libraries....
Score of 3
2 answers
153 views
How can callers cancel independently when they share the same fetch request?
I'm trying to avoid duplicate requests when two parts of a page need the same data.
The part I can't get right is cancellation. If one caller stops waiting, it shouldn't cancel the request for the ...
Score of 0
1 answer
151 views
How to close mobile menu after clicking a link
I have some code here that creates a mobile menu (it works well!) But after clicking a link in the mobile menu, it doesn't close.
It works, but it needs to be closed manually. How can I incorporate ...
Score of 3
2 answers
121 views
Next.js 15 memory usage keeps increasing when polling a live darts API every second
I'm building a live darts scoreboard using Next.js 15 (App Router) and TypeScript. The application fetches live match data from a sports API every second to display the current score, legs, sets, and ...
Score of -3
2 answers
114 views
Product links don't respond to the first tap on Android after swiping
On mobile devices only, after swiping the Owl Carousel with a finger, tapping a product or category link does not open it on the first tap. The link opens only after two consecutive taps or after ...
Score of -5
1 answer
157 views
How to get rid of the session storage in my code? [closed]
An admin can view the products in the inventory by clicking an anchor element, if there are no products in the database, then there is no need to show the anchor element that enables him to view the ...
Score of 2
1 answer
92 views
jQuery: $.when.apply() fails when there is only one AJAX request instead of several
I'm working on a practice project with jQuery and AJAX, and I'm building the interface with Bootstrap 5. The project consumes the public Rick and Morty API.
In the API, each character has an array of ...