All Questions
14,664
questions
-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....
-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 ...
0
votes
1
answer
29
views
Cannot define variables in TS file with input elements from HTML
I'm trying to run a ts/js file from a button in an HTML file.
I'm using TS and node js.
this is a bit of code where I get the error
document.addEventListener('DOMContentLoaded', () => {
const ...
-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 ...
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 ...
-2
votes
0
answers
18
views
Extract Computed Accessibility properties from a Facebook post element
I'm trying to identify Sponsored Facebook posts using HTML content. But there are no distinguishable attributes for Sponsored posts compared to normal posts that I can identify.
Then there is the ...
0
votes
1
answer
63
views
How do I change background color of a toggle switch with javascript?
I was creating a library project, every book is a object with properties title, author, pages, and read-status stored in a array.
There's an 'add book' button which opens a modal and asks the user the ...
-1
votes
1
answer
37
views
document.activeElement not displaying focused elements within shadow root
document.activeElement is neat, but when using it on a site that uses shadow root - I get the outer container. How can I get the active element within nested shadow roots?
Do I need to crawl through ...
-2
votes
1
answer
65
views
How to HTMLElement[] type from DOM? [duplicate]
In TypeScript I need to collect all top level document of a page and using below code (the condition inside if is made simpler for brevity):
const getHTMLElement() : HTMLElement[] {
const doc = ...
0
votes
0
answers
22
views
Referencing DOM objects directly by their IDs is automatically enabled - is it a good practice? [duplicate]
I was today years old when I learned that every HTML element added to the DOM and given an id is automatically added to the window object using the name provided in the id.
For example, <input type=...
0
votes
1
answer
35
views
Vue component is not working properly, can i do this?
I'm trying to add a template tag with attributes and values nut it keeps displaying this error message
<script> </script> <template> <nav class="navbar navbar-expand-lg bg-...
-1
votes
0
answers
48
views
Axios and qs from plain js
So I tried to import axios and qs in my html file using (below) to use axios and qs in my app.js
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/axios.min.js"></script&...
1
vote
0
answers
33
views
programmatic way to get parent stylesheet for computed style on HTML element?
In Chrome, I can inspect an element, view its computed styles, and for each property, see not only the computed value, but a link to the stylesheet from which it came.
The question: how might I obtain ...
0
votes
1
answer
33
views
How change default tooltip after form validity checking to display until the error is fixed?
After filling out the form and clicking on "submit", the first field with an error has the tooltip "Value not filled in!".
It automatically disappears after the focus is changed or ...