2,523,233 questions
0
votes
0
answers
37
views
Getting my background to reverse color when moving to light mode
I'm working on a website that uses the Catppuccin theme system. Dark mode works fine, but I'm having trouble getting the background image to render correctly in light mode (Latte).
My default ...
Best practices
0
votes
0
replies
22
views
Does Angular track all dependencies of an @Injectable even when using "inject()"?
In the decorator's usage notes, Angular claims it does track all deps. Also, inject() is the prefered way to inject deps to e.g. a service instead of injecting deps from its constructor.
However, if I ...
Advice
0
votes
3
replies
85
views
Why is there a difference when measuring words in an HTML page, vs. measuring their individual letters?
I'm trying something with similar goals as the Knuth-Plass linebreaking algorithm. (However, no offering on the market will work for my use case - and I don't want the overhead of a library anyhow.)
...
-2
votes
1
answer
68
views
How to separate a body colliding with two (or more) others given their overlap
I am programming a top-down game where the player is a circle and there are circular and polygonal obstacles that the player can collide with. I am using a Separating Axis Theorem library to help with ...
Advice
0
votes
2
replies
62
views
Remove White Space From Search When Pasting
I am trying to either add a button or automatic white space trimmer to my search bar on submit. For example if I copy and paste numbers, sometimes there are spaces before, this I want to remove ...
Advice
0
votes
4
replies
71
views
interactive SVG on drupal
I created a rather simple interactive illustration with html (an <svg> with four <button>, all inside a <figure>) with a bit of css and js so that when the user clicks the buttons ...
Advice
0
votes
2
replies
54
views
Need an overview of this widget I'm making
I'm very new to Javascript and was making a little DDLC themed widget, I got it working as intended but I worry my inexperience made me end up doing Javascript that's bulky and over complicated and I ...
0
votes
0
answers
62
views
Loading three.js texture from UInt8Array in plugin
I'm trying to implement a three.js texture loader for the JPEG 360 format. For this purpose, it's really a JPEG image embedded in a nested set of "boxes", very similar to the structures used ...
Advice
0
votes
3
replies
79
views
How to compare to Dictionary objects in js
I was solving a problem, and Its important to compare both dictionary, but js doesn't support it I cant use operator like this == or === to compare 2 objects, how can I do that without using any ...
Best practices
0
votes
2
replies
52
views
How to "sync" Prisma with sessions?
I have a node js code that authenticates with cookies and sessions:
import express from "express";
import session from "express-session";
import postgreSession from "connect-...
0
votes
0
answers
48
views
Fresh Next.js install throws createClientModuleProxy / buildId errors [closed]
Fresh Next.js install throws createClientModuleProxy / deploymentId / buildId errors on Node.js v24
I created a fresh Next.js app using:
npx create-next-app@latest my-app
Then I ran:
npm run dev
...
1
vote
1
answer
116
views
Error sending HTML form data with JavaScript front end through Flask backend to MySQL database [closed]
I get the error "400 (BAD REQUEST)" in the browser (dev tools) console when trying to send HTML form data with JS frontend to MySQL database through a flask back end.
HTML form:
<form id=&...
0
votes
1
answer
100
views
Closures with Async functions
so I saw that closures (aka functions that return whole functions) are a neat way to have a function keep variables without needing to pollute globals too much, now the problem is that when I try this ...
0
votes
0
answers
88
views
highlighting text in abc when clicking on rendered music
I've implemented a simple abc editor using Paul Rosen's abc-basic.js with the ability to transpose the key in the rendered output. I've used the excellent example at https://examples.abcjs.net/editor-...
-2
votes
1
answer
77
views
How I use the value of LocalStorage in other .js [closed]
Im doing a HTML forms and I dont know how to take the value of LocalStorage.
I dont know how to use it in other .js, adding the code:
let descripcion = document.getElementById("descripcion")
...