Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
7 views

WKWebView accessibility tree not updated after DOM change

I have a simple UIKit app that pushes a view containing a WKWebView. If VoiceOver is enabled, when the view is pushed the OS sets the accessibility focus in the back button of the navigation bar. The ...
rai212's user avatar
  • 751
-1 votes
0 answers
39 views

How to regex and replace innerText and then restore the HTML elements

I want to regex and replace only text content(innerText) of an html, and in the end keep all the HTML elements (or restore them as they were). The regex must not check the HTML elements, but only the ...
bobby324's user avatar
0 votes
0 answers
16 views

in vscode Autocompletion does not occur when manipulating the dome

const h1 = document.querySelector('#hi'); h1.styl = "red" --> not auto-completed I would like to autocomplete style. Please tell me how to solve it. I am aware that auto-completion is ...
poorcoder's user avatar
-1 votes
1 answer
51 views

Why does the async loop `File.stream().getReader().read()` may block main thread?

<input type="file" id="el"> <code id="out"></code> const el = document.getElementById('el'); const out = document.getElementById('out'); el....
DisLido's user avatar
  • 15
0 votes
0 answers
33 views

How to hide entire search results form google in the best way?

What I am trying to accomplish: I am trying to create a google chrome extension that removes/hides certain search results from the google search results My code thus far: const rules = { "https:...
Bart S's user avatar
  • 13
-1 votes
0 answers
28 views

How to get co-ordinates of a web element for Chrome or safari using JavaScript

There is an element/button on the bottom left of the page and I want to validate that it's being appeared at the correct position always, hence I tried to take the X,Y cordinates to validate and have ...
sleepingpanda's user avatar
-1 votes
1 answer
34 views

How to enable Drag and Drop in Vue/JS/HTML with an inventory system?

I want to recreate a inventory system like the one in minecraft as it is helping understand a lot of web dev stuff and just overall becoming a better developer, my code is not working and updating my ...
Dirk's user avatar
  • 1
0 votes
3 answers
41 views

Can I use an event listener with two events?

I am doing a "pixel art" web page, and I don't want the "pencil" to draw when I am not pressing the button on the mouse, I try to do this but either I can make the "pencil&...
Alexandra Fernández's user avatar
0 votes
0 answers
23 views

Can't access element's properties using DOM in p5.js

I am trying to expand on The Coding Train's Monty Hall Problem demonstration using p5.js, and I am stuck in trying to implement an automatic mode. Everything works fine, except that the background of ...
Ardi's user avatar
  • 35
0 votes
3 answers
38 views

Selecting elements in HTML using tree generator extension

I have recently been trying to understand how to select elements and manipulate them using the html tree generator and JavaScript. How do I select the second last element of the last element child and ...
Kepher Ashitakaya's user avatar
1 vote
2 answers
50 views

localStorage Value is Stored and Loaded Correctly but Not Applied to Checkbox Input

I am trying to use localStorage to store and load the checked state of a checkbox. The values are being correctly stored and retrieved from localStorage, but the checkbox is not reflecting these ...
Muhammad Aleem's user avatar
0 votes
0 answers
46 views

ClassList property isn't working when using an Event Listener [closed]

const heading = document.querySelectorAll('h2'); const para = document.querySelectorAll('.text'); heading.forEach((head, index) => { para[0].style.display = 'block'; head.addEventListener('...
Nail Val's user avatar
-1 votes
1 answer
22 views

Is the DOMRect from .getBoundingClientRect() live or immutable?

Let's say I get a DOMRect object from calling .getBoundingClientRect on an element: let domRect = el.getBoundingClientRect(); If I keep this object around and the bounding rectangle of el changes (...
Jo Liss's user avatar
  • 32.2k
1 vote
1 answer
34 views

what is the difference between .getBoundingClientRect().top and .getBoundingClientRect().y in javascript?

im really confused about the difference between these two methods. every time i use theme the have the same value so what is the difference? heres the code i tried as an example. const btnGetCoord = ...
Mobin's user avatar
  • 13
-3 votes
1 answer
45 views

What's the difference between className and classList.value?

Before you mark this answer as duplicate, I'm talking about "classList.value", not "classList". What are the differences between: element.className = 'main'; element.classList....
Tigerrrrr's user avatar
  • 1,081

15 30 50 per page
1
2 3 4 5
1868