Questions tagged [javascript]
For questions about programming in ECMAScript (JavaScript/JS) and its different dialects/implementations (except for ActionScript). Note that JavaScript is NOT Java. Include all tags that are relevant to your question: e.g., [node.js], [jQuery], [JSON], [ReactJS], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript
2,532,439
questions
1
vote
0
answers
7
views
How to prevent parcel from moving images around?
Trying to use webgl to render a texture, and I am using some npm libraries so I am using .cjs files and using parcel to run it. When I try to get the image from my resources file it doesnt work ...
-1
votes
0
answers
12
views
Is my function in the correct scope? What is the problem with it? [closed]
Link to error
So I am currently working on the Tic Tac Toe game of the odin project and having problems. I want to set up a function running the game itself and to do that I created a function called ...
-4
votes
1
answer
20
views
Converting JSON to Base64 using JavaScript without dependencies [closed]
I'm after reading a few posts on the subject, a few of which suggested atob/btoa are too buggy to be used in prod. mdn has no deprecation badge for them. I need a zero dependency JavaScript solution ...
0
votes
0
answers
5
views
RangeError: Array buffer allocation failed after multiple page refreshes despite sufficient memory
I'm encountering a RangeError: Array buffer allocation failed error in my JavaScript application after refreshing the page multiple times. The error occurs even though the memory usage appears to be ...
-3
votes
1
answer
17
views
<br> tag doesn't work with AppendChild() and display: flex
I am making a to-do list program where after every checkbox, there should be a new line. But the br function doesn't work and I think it has to do with the CSS text, where the code is display: flex. ...
0
votes
1
answer
23
views
Render Items in Component Not the whole component
am getting data from websocket for real live update am updating Inside Popup of leaflet map, useEffect start re-render to get new data so the Popup disappears and I need to click again on the mark on ...
0
votes
1
answer
9
views
Why are my stripe webhook session details saying they are undefined?
I am creating a stripe checkout session in my development mode, that is successfully sending information to my webhook, and when I print out my session details, it successfully prints out all the ...
1
vote
0
answers
12
views
Headers Error while making discord authorization page
I'm making a website with dashboard for a Discord bot. Only when I'm making the authorization page with the help of JWT to make a token it keeps giving me a headers error (see below). I'll put my code ...
0
votes
0
answers
13
views
Multiple re-renders issue when updating loading state on parent component in React
I have a parent component which has a isLoading useState and read params from the URL and pass them to child component:
export function MainUserDetails() {
const [isLoading, setIsLoading] = React....
0
votes
1
answer
31
views
UseState React hook: updating state is not consistent
I'm trying to build a shopping cart. Just about an hour ago I created another post with a similar problem I was running into, and that problem was solved and I was able to implement that properly.
In ...
1
vote
0
answers
12
views
Interpolation of vertex attributes during rasterization
RENDER
There is a set of vertices:
new Vector(-0.5,-0.5,-0.5),
new Vector(-0.5, 0.5,-0.5),
new Vector( 0.5, 0.5,-0.5),
new Vector( 0.5,-0.5,-0.5),
new Vector(-0....
-1
votes
0
answers
7
views
Error: Element type is invalid. Received a promise that resolves to: [object Module]. Lazy element type must resolve to a class or function [closed]
Hi I'm getting this Error: Error: Element type is invalid. Received a promise that resolves to: [object Module]. Lazy element type must resolve to a class or function.
//firebase.js
import { ...
1
vote
0
answers
10
views
Apps Script - How to send an HTTP 200 response?
I have an Apps Script running as a web app for Slack. Slack sends a POST request and expects a HTTP 200 response within 3 seconds, otherwise it shows a timeout error to the Slack user. I have been ...
0
votes
1
answer
21
views
cannot acces elements when using x-for
I made this code to get a json file and display a field from each of the elements
<script src="https://www.unpkg.com/alpinejs" defer></script>
<script>
function note(a) {...
0
votes
1
answer
36
views
Using setInterval in javascript [duplicate]
I modified a javascript code using setInterval to alternate between two messages using innerHTML. I tried document.write and it works. But innerHTML does not work.
// Create global interval and ...