41,769 questions
0
votes
0
answers
43
views
How does the Gboard, when typing into a textfield on Chrome mobile, do "select all"?
I have a
<input type="text"...
...on a page, and need to copy all the changes so that I can display them in a wasm app. I'm stuck with this "select all" operation on Gboard. ...
0
votes
0
answers
27
views
How to reliably capture high-quality audio/transcripts from Google Meet using a bot (without official API)? [closed]
I’m building a system where a bot joins a Google Meet call and extracts live transcription.
Right now, I’m injecting JavaScript into the Meet tab (through a browser automation bot) and scraping the ...
0
votes
2
answers
58
views
How to select an element after changing its class name with DOM? [duplicate]
The objective is to create a start button that activates the 3x3 grid and make it playable.
The cells start with an 'inactive' class. Clicking on the start button changes them from 'inactive' to '...
Advice
0
votes
2
replies
65
views
How to obtain HTML DOM from markdown?
I have some markdown text.
I use MarkDig to parse the markdown text and obtain a markdown-document-object-model. (markdown-DOM.)
From that, I want to obtain an HTML-DOM.
As far as I can tell, the only ...
Advice
0
votes
0
replies
33
views
In silevis/reactgrid ReactGrid .rg-partial-area-selected-range element does not disappear after setting the focusLocation property
I am using the ReactGrid component and I have enabled fillHandled and rangeSelection. Also, I am controlling the focus with focusLocation property. However, there is one scenario that does not work as ...
0
votes
0
answers
83
views
Disappearing menu hamburger from address bar on Safari mobile
I have a web page where I allow users to download an image by clicking a button. I’m using vanilla JavaScript like this:
async function downloadFile(url) {
const response = await fetch(url);
const ...
0
votes
0
answers
102
views
Why is document.querySelectorAll() not updating after new elements are added? [duplicate]
I’m creating a simple JS app where I dynamically add new elements to the DOM.
However, when I call document.querySelectorAll() after adding them, it doesn’t seem to include the new elements.
Example:
...
-4
votes
1
answer
120
views
golang http.Get() only returning a portion of html body
CONTEXT: My goal is to use http.Get(), then use the golang.org/x/net/html package to parse the resp.Body and extract some bits of data from some <div>'s that all use a similar naming scheme for ...
1
vote
1
answer
68
views
Dynamic tab content from hidden div not rendering reliably with jQuery on PHP page
I'm building a PHP page with multiple tabs (Termijnen, Mandaten, and Admin). Each tab's content is pre-rendered by PHP inside hidden <div> elements. I then inject the content into a visible ...
4
votes
3
answers
306
views
HTML link does not get focus outline on receiving focus unless textarea has been focussed explicitly
Example 1 - No focus outline for link
I have a keydown handler for a <textarea>. When the handler gets invoked, I want a link (<a> tag) to receive focus. If you run the example below, ...
1
vote
2
answers
87
views
How to remove all text from inside HTML elements of certain types in an XHTML file (in ePub)
Situation
My goal is to remove ALL text from a html file. The file is a part of an ePub (electronic book)
Example input and output
(It is a chapter of a novel, contained within a single xhtml file.)
&...
0
votes
0
answers
41
views
Page unresponsive when loading 10k+ rows into AG Grid pivot table (with row/column virtualization enabled)
I’m new to AG Grid and trying to populate data into a pivot table in Angular.
I fetch the entire dataset in one API call (legacy, so I cannot change backend code).
In the frontend, users can drag ...
0
votes
1
answer
63
views
How to add a second CSS property (color change) to a transform animation using classList.toggle? [closed]
I'm working on a simple project where I want to animate a div element. I'm trying to make a white box both move to the right and change color when it's clicked. I'm using a JavaScript click event to ...
0
votes
1
answer
101
views
React Axios POST request returns success but no Preview/Response in Chrome Network DevTools
I am building a signup feature in React. My API is working fine — when I hit the endpoint in Postman or cURL, I get a 201 Created response with JSON.
But in Chrome DevTools → Network tab, when I ...
0
votes
1
answer
102
views
How can I prevent selecting DOM elements that exist only in memory? [closed]
I have a modal with elements that I want to return to a default state every time the modal is closed. Rather than worry about making sure I tell the openModal or closeModal functions to clear each ...
0
votes
2
answers
177
views
User script append to DOM without having to reload page
I am working on a user script (I'm using Tampermoney as my user script manager) to append a dynamic Rotten Tomatoes link to a Jellyfin movies/series page.
It works when I manually reload on the title'...
0
votes
1
answer
54
views
Audio File Not Playing DOM
I'm creating a mini music player so I can customize it, however I'm currently stuck on why my audio link isn't play any sound.
PS: Don't mind how messy this is. This will be cleaned up later.
CODE
<...
1
vote
2
answers
116
views
How to filer multiple TDs with one input text box only
I have a table with six columns containing approximately 7,000 entries. Currently, the table is filtered by six separate input text boxes, each with its own JavaScript function. Each function targets ...
1
vote
3
answers
95
views
Why does my div element display and then disappear after clicking the submit button?
I add an addEventListener so that when the user clicks on the "post" button, a new div with the user input should appear above it. But it disappears as soon as it appears. I have attached a ...
2
votes
1
answer
75
views
Why does the style property in JavaScript work even if I didn't select the element (didn't make the variable)? [duplicate]
So, I was doing a lesson on Scrimba about JavaScript, when I were told to do this JavaScript challenge involving the style property.
But I forgot to select question via document.getElementById(). ...
3
votes
1
answer
86
views
How can I make the hidden div to fade in when the slide changes?
My script is supposed to fadeIn() a div when a slide of the carousel is "active".
At the start, the first image is visible, le div slowly fades in.
I manually move to any slide, but then the ...
0
votes
0
answers
74
views
Find a DOM element on a Google Spreadsheet [duplicate]
This is a follow-up to this question I asked a year ago, about building a Chrome extension on top of a Google Spreadsheet. I'm trying to identify a hyperlink element in GSheets via my Chrome ext to ...
2
votes
3
answers
123
views
Why element.querySelector matches a selector referencing an ancestor of element?
In this example I would expect that the elements list is empty, since we set the starting point of the query to the div.bbb element. Somehow it matches the span element even though none of the div ...
1
vote
1
answer
75
views
Using P5 createRadio() in a class and having two objects of that class leads to radio buttons not functioning independently [closed]
When I use the createRadio() function from the p5js library in a function constructor and create multiple objects of that class, the radio buttons act differently, when I select an option in a radio ...
0
votes
3
answers
97
views
is there a difference between elements created dynamically with JavaScript and elements in HTML
take the code below:
contentsDiv.innerHTML = container.outerHTML;
if(contentsDiv.firstChild === container) console.log('true');
in this code, contentsDiv is a div created in my html file ...
-2
votes
1
answer
67
views
addEventListener vs onclick - which one overwrites the other? [duplicate]
If I use both Which one runs? Do they both run? Having trouble understanding the difference.
const button = document.getElementById('button')
button.onclick = function() { console.log('onclick'); } // ...
1
vote
1
answer
61
views
getCSRFToken is not defined error, JavaScript
This is the part of the code in the Django + JavaScript Todo App that is responsible for deleting a note. I need a csrftoken for this, but the JS is showing me an error in the console. What did I do ...
0
votes
2
answers
76
views
xpath filtering misleading misconception behavior [closed]
I have noticed this xpath misleading behavior problem,
for this expression:
elemA[ not(elemB) ]
it has two meanings:
1. yes show all elemA filtered all childs elemB. eg: select all elements but ...
0
votes
1
answer
72
views
ReactJS - Javascript addEventListener does not remove the listener function at component's unMount
I have added an event listener to "keydown" event in my ReactJS application. Because of a third party library, I'm adding it via setTimeout in a useEffect, this component is like a popup, so ...
2
votes
2
answers
70
views
Can a HTMLCollection change while iterating through it, even though no changes to DOM are made in THIS thread?
So, I have a mystery bug that is hard to reproduce, and so far my best suspect is this code:
function getMagicElement(root) {
var collection = root.getElementsByTagName('span');
for ( var i = ...
1
vote
1
answer
156
views
Web Components: Slots are not working as (I) expected in light DOM
How can I change the following light DOM custom element to show the content of the default slot between (!!!) the two horizontal rulers?
Please be aware, that I cannot use shadow DOM in my use case.
&...
2
votes
1
answer
93
views
jsPDF adds image at incorrect size and position when using dimensions from getBoundingClientRect and clientHeight/clientWidth
I am trying to add an HTMLElement to a PDF after converting it to an image using "toPng" from "html-to-image".
The HTMLElement exists inside another, that plays the role of the ...
0
votes
0
answers
116
views
Updating HTML element causes PointerLockControls to stutter in three.js
For quite some time, I've had an issue in three.js where when putting any HTML element updates in my animation loop, my PointerLockControls always have a strange stutter. For example:
function animate(...
0
votes
0
answers
134
views
How to change iFrame src with a default value when the original src does not exist?
I have the following basic html code in a file called default.html:
<html>
<head></head>
<body>
<input id="year" type="number" min="2000" ...
0
votes
1
answer
53
views
Traversing and Transforming Children of preact components
I've recently had a problem with needing to traverse and transform some DOM children from a Parent Preact component:
import {isElevated} from "../stores/UserStateStore.ts";
import type {...
0
votes
2
answers
61
views
New line in a X post
I wrote a browser extention for social media handling.
You can e.g. reformulate your given text to make it more positive etc.
Now if I insert the response to the X - Reply Textarea back it does not ...
1
vote
1
answer
65
views
Why is my `<p id="time">` not displaying anything when using JavaScript in a separate file?
I'm trying to display the current time inside a paragraph element using JavaScript. My HTML and JavaScript are in separate files.
Here's my HTML snippet:
<p id="time"></p>
And ...
0
votes
0
answers
44
views
getElementById() returns null in JavaScript [duplicate]
I'd like to create a dynamic select menu in JavaScript and hit a problem below.
When I run the codes below, I got an error which reads "Uncaught TypeError: Cannot read properties of null (reading ...
1
vote
1
answer
44
views
HTML - Make an Iframe hide a loader
I have a simple html file and I have a loader (div .loader) from UIVerse to cover until the iframe for a google form loads in then my javascript code
const iframe = document.querySelector('iframe');
...
0
votes
3
answers
105
views
How to add an audio to a DOM button?
I am trying to enhance my Js knowledge by building a simple music player in HTML, JS and Tailwind CSS.
I am trying to add the DOM buttons to all of the audios. I expect the buttons to play the audio ...
0
votes
2
answers
89
views
HTML div element not honoring visibility nor style attributes as they are updated
I'm creating basically a tooltip for SVG groups. I'm not using the title=>tooltip built in because I want to have richer content eventually that plain text can't support.
I've used a div element ...
-1
votes
1
answer
94
views
Is it possible for a server to detect client-side DOM element manipulation?
When a user deletes a <p> element (or any DOM element) using browser developer tools/extensions, these changes are local and don’t notify the server. However, if the client specifically wants to ...
-1
votes
3
answers
88
views
JavaScript / CSS / DOM - dynamic class value overwrite, concatenation problem/challenge
In this snippet, changing the background-color to yellow works. But when i try to modify the value of 'grid-template-column', which takes an unusual value, a string of repeating 'auto' strings - no go....
0
votes
0
answers
29
views
How to locate custom elements of pdftron in DOM
our dev team working with apryse pdftron (angular) and using custom elements on the loaded document, like checkbox, textbox - which you can drag-and-drop into the webviewer.
My problem is, that these ...
2
votes
1
answer
333
views
Is it possible to make a bindable snippet in Svelte 5?
I have two components, a parent and a child. I want to define some content in the child that isn't rendered in its DOM hierarchy, but rather rendered by the parent in its own hierarchy.
My child ...
1
vote
1
answer
74
views
Why do the stax and the dom api write xml attributes with newlines differently?
I'm writing an xml file using the stax and the dom api.
The stax api writes the newline unchanged.
The dom api escapes the newline in the attribute to .
Why is there a difference? How do I ...
5
votes
4
answers
254
views
Stop Gecko/Mozilla from saving DOM state from last browser session
After opening Waterfox 6.5 (Firefox 128 ESR) back up (days or hours later) the session for my website is expired. However now the browser saves the DOM state and this leads to literally every form and ...
0
votes
1
answer
96
views
Bootstrap 5 tooltips not working when added after document ready
I have a page that loads a javascript file. At the top of the javascript file I am declaring my constants for Bootstrap 5 tooltips:
const tooltipTriggerList = document.querySelectorAll('[data-bs-...
0
votes
0
answers
26
views
Environment Variables Not Fully Applied for External Scripts in Nuxt 3
Problem
Environment variables defined in nuxt.config.ts are retrieved correctly, but external scripts (e.g., Google Analytics and Chatway) relying on these variables are not working. The scripts are ...
0
votes
1
answer
49
views
finding of parent of an html node in javascript using recursion? [duplicate]
Basically I need a less stupid way to do this:
var x = getElementById('not-important');
x.parentElement.parentElement.parentElement.parentElement....parentElement.style.display = 'none';
In my case ...