2,521,493 questions
Score of -4
0 answers
58 views
Playwright JavaScript: MakeMyTrip flight search shows NETWORK PROBLEM despite HTTP 200 responses [closed]
Problem description
I am automating the flight search functionality on the MakeMyTrip website using Playwright with JavaScript.
When I open MakeMyTrip manually in Chrome, enter the flight search ...
Score of 0
4 answers
134 views
Can setting/retrieving properties on any HTML element be a security risk?
When assigning properties to a HTMLElement directly (so [Element].someProperty), it looks like anything goes.
You would expect that invalid properties either throw some error or are weeded out ...
Score of -6
0 answers
92 views
Synchronous text file reading in browser [duplicate]
I am new to javascript so I might misunderstand some details.
Problem is that I have a javascript function for reading text files, in for nodejs it is implemenetd this way
function cat (path) {
...
Score of 0
1 answer
94 views
Tabulator with nested tables jumping to top when updating a sub-table
I have a very long non-paginated (deliberate) tabulator table designed to create a quotation price list. I don't want a scrollbar inside the table, so I have set the height to 100%. The main table ...
Score of -11
0 answers
134 views
Facebook Page Plugin Stopped Working w/o Deploying [closed]
For some reason, FB Page Plugin has stopped working today:
See all errors here:
WHTZSNYgAZx.js:84 ErrorUtils caught an error:
Could not find element "u_1_u_If" [Caught in: Module "...
Score of -6
1 answer
113 views
Waiting for browser to repaint screen, using requestAnimationFrame. Works for the 1st try [duplicate]
Here's my full code: I expect "End of Test" to be the last message but it isn't. "back to yellow" is the last message. Tried on Edge and Firefox. What I get:
div goes yellow, ...
Score of -8
0 answers
97 views
CounterFactory Troubleshooting [closed]
I am being made to create a counter factory system in javascript for an assignment.
const counterFactory = (initialValue) => {
let counter = initialValue;
const increment = (incrementBy) => ...
Score of -5
0 answers
54 views
How can I prevent duplicate API requests in React when using useEffect? [duplicate]
I'm working on a React application that fetches data from a backend API using useEffect. Sometimes, the API request runs more than once, causing duplicate requests.
What is the correct way to prevent ...
Score of 1
1 answer
122 views
How do I create a native context menu with custom options? [duplicate]
When I search for code for a “custom context menu”, I get code for how to recreate a context menu with HTML elements, but that's not really what I want. The simple solutions forget about the context ...
Score of -2
1 answer
78 views
Does sinon.restore() also restore all mySandbox.stub()s?
Sinon has a sandbox concept to group stubs and restore them together. Documentation says that sinon itself is simply the default sandbox.
Does this mean that sinon and mySandbox are separate and do ...
Score of 2
1 answer
100 views
How to override styles of React component with vanilla extract?
How can I ensure style rules for extended component take precedence over style rules for the component I am extending using vanilla extract?
Assuming code like this:
// my-component.css.ts
import { ...
Score of 0
3 answers
154 views
Changing two images simultaneously with one button-onclick and querySelector
I'm trying to use onclick and querySelector to do the following: there's four buttons->each button is connected to two, overlapping images(i plan to put more images in between them, so they have to ...
Score of 2
1 answer
176 views
Why does changing an attribute in JavaScript not affect my CSS attribute selector?
I'm trying to dynamically create buttons in JavaScript, add them to a div, and then use CSS attribute selectors to change their colors, opacities, and positions
But the CSS part doesn't work, nothing ...
Score of -6
0 answers
138 views
Joomla 4: 403 Forbidden error when saving custom HTML module containing inline JavaScript
I am running Joomla 4.4 with the Helix Ultimate template.
I want to add a floating WhatsApp button to all pages. The button HTML and JavaScript work fine in local testing.
When I paste HTML + inline &...
Score of 0
2 answers
315 views
Javascript if statement only runs once [closed]
I'm trying to create a mockup feature where you click on a tab and it pulls down a menu, and when you click on the tab again it goes back up. I managed to get it to work, but the Javascript only runs ...