Skip to main content

All Questions

Tagged with
0 votes
0 answers
15 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
-2 votes
0 answers
17 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 ...
Lasith's user avatar
  • 54
0 votes
1 answer
62 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 ...
Muzzu153's user avatar
-1 votes
1 answer
31 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 ...
Salmin Skenderovic's user avatar
-2 votes
1 answer
64 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 = ...
xkeshav's user avatar
  • 53.5k
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=...
Ryan Griggs's user avatar
  • 2,648
0 votes
1 answer
33 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-...
Wilson Uchenna's user avatar
-1 votes
0 answers
47 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&...
user25823001's user avatar
1 vote
0 answers
31 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 ...
J Nutt's user avatar
  • 11
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 ...
Polikarpos Goldshtein's user avatar
0 votes
0 answers
37 views

JavaScript Execution Issue after HTML Replacement

I'm currently facing an issue with JavaScript execution after dynamically replacing the HTML content in my web application using JavaScript. CURRENT FUNCTION: function insertHTML(decodedData) { // ...
Abdul Rehman's user avatar
0 votes
0 answers
27 views

Where one can find the built-in onclick method of a button within a form tag?

I'm trying to understand a little of how the following html code snippet works under the hood: <form action="/some_action" method="POST"> <input name="name"&...
Clodo's user avatar
  • 1
-2 votes
2 answers
60 views

Multi tag replace between values

I have some script which makes replacements. It works fine, but because of replaced values standing close to each other i've got more than one between values. It looks like: <br /> Value <...
Cove's user avatar
  • 669
0 votes
0 answers
19 views

How to scroll web page like Vimium?

I'm currently building a website that can scroll down or up like the browser already installed Vimium plugin. But I found that vimium scroll animation speed is different from window.scrollBy(), ...
Marshall Hank's user avatar
1 vote
0 answers
33 views

Does the HTML/JavaScript standard guarantee .click()ing elements that are not appened to the DOM?

In some solutions to "trigger file downloads with JavaScript" questions, the pattern link = document.createElement('a') link.click() is used. In various places, people report that this did ...
nh2's user avatar
  • 25.4k

15 30 50 per page
1
2 3 4 5
978