2,521,965 questions
Score of 0
0 answers
5 views
Emulating a key press in JavaScript: dispatching a KeyboardEvent not working?
I’m writing a project which includes faking a simple key press. Eventually, it’s to be the Escape key, but I’m starting out with a simple character.
I’ve seen dozens of articles and posts, including ...
Score of -1
1 answer
57 views
Unable to generate audio element on an HTML page using JavaScript
I'm trying to have an audio element/audio player be generated upon the user clicking a button, however upon clicking the button, nothing happens.
I've linked my main.js file in the header of the HTML ...
Score of 0
0 answers
53 views
How can I apply custom syntax highlighting colors to CodeMirror to match Prism.js Okaidia theme?
I am building a coding tutorial website and using Prism.js (Okaidia theme) for static example boxes and CodeMirror for the interactive editor. I want to match the colors of both.
The Comparison:
...
Score of -2
1 answer
58 views
on click on element, react fails with "destroy is not a function"
This occurred after the recent browser update to chrome/edge 150, with the following code:
React.useEffect(() => endElementRef.current?.scrollIntoView(false), [endElementRef.current, lastByte]);
...
Score of 0
0 answers
63 views
Elementor Free: JavaScript changes tab-specific background image, but disables the default background when page is opened from the main menu
I’m using WordPress + Elementor Free and an Elementor Nested Tabs widget.
The website is aquariustile.com
I have a Services page with five tabs:
Bathrooms — #bathrooms
Kitchen — #kitchen
Flooring — ...
Score of -3
1 answer
105 views
How do I get a random element from an array in a JSON file? [closed]
I have a folder with the files: index.html, script.js and words.json - a word list in the following format:
"a": 1,
How do I get a random word from words.json within script.js?
I tried ...
Score of -7
0 answers
71 views
Hono app not deploying to vercel: Can't read properties of undefined (reading 'readfile') [closed]
I am working on an e-commerce backend using hono.
I used npm create hono@latest to scaffold the app, changed nothing. When using vc deploy, it shows the error:
Can't read properties of undefined (...
Score of 1
0 answers
111 views
Stripe Connect onboarding works in test mode but redirects to login in live mode
I am developing an app which integrate Stripe as payment, but the user doesn't need the hassle going to Stripe to manage everything, they can do it in the app. So when activating Stripe on testing env ...
Score of -7
1 answer
134 views
Can users pretend they have a different location with navigator.geolocation or is it save?
I have been using IP addresses to find out the users current location, so I also had to check if they were on a VPN, proxy or tor to make sure I get the proper location now since this new update in ...
Score of 0
0 answers
31 views
How to include type when renaming a property during object destructuring? [duplicate]
The initial example in JavaScript when I could get the img property from the object and then rename it to image:
// snippet.js
const person = {
img: "./images/mr-whiskerson.png",
...
Score of -2
0 answers
102 views
Detecting the framework from a signal factory function signature
I'm trying to figure out an approach for detecting what framework a signal function is coming from. It's for this state manager. I'm rewriting it to support signal use from any framework
Something ...
Score of 0
0 answers
85 views
Chrome Extension: How can I detect the actual video URL from a dynamically loaded video page? [closed]
I’m building a Chrome extension using Manifest V3 and JavaScript. The extension detects a Kuaishou video page correctly, but I’m having trouble getting the actual video/media URL.
The video content is ...
Score of -1
1 answer
130 views
Is redirecting using JavaScript to a URL with a fragment prohibited?
I have an application that can be included at any point in a person's page - e.g. half-way down the page after their own HTML has been output.
My application shows database information. It saves this ...
Score of -5
0 answers
93 views
Why does mySQL select query work on my database but not in code editor [closed]
I wrote a SQL statement in JavaScript that is meant to display restaurants that have wheelchair access.
export async function show_access(){
const [result] = await con.query(" SELECT * FROM ...
Score of 1
0 answers
60 views
Google Chat API + Apps Script "Can't handle the app's response" error when clicking a card button (Web App / OAuth2)
I'm building a Google Chat Bot integration using Google Apps Script and GCP Service Account (OAuth2).
The Flow:
Form submitted -> Apps Script sends a Card message to a Google Chat space using ...
